.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "TM::ResourceAble 3pm" .TH TM::ResourceAble 3pm "2019-09-07" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" TM::ResourceAble \- Topic Maps, abstract trait for resource\-backed Topic Maps .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& package MyNiftyMap; \& \& use TM; \& use base qw(TM); \& use Class::Trait (\*(AqTM::ResourceAble\*(Aq); \& \& 1; \& \& my $tm = new MyNiftyMap; \& $tm\->url (\*(Aqhttp://nirvana/\*(Aq); \& \& warn $tm\->mtime; \& \& # or at runtime even: \& \& use TM; \& Class::Trait\->apply (\*(AqTM\*(Aq, qw(TM::ResourceAble)); \& my $tm = new TM; \& warn $tm\->mtime; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This traits adds methods to provide the role \fIresource\fR to a map. That allows a map to be associated with a resource which is addressed by a \s-1URL\s0 (actually a \s-1URI\s0 for that matter). .SS "Predefined URIs" .IX Subsection "Predefined URIs" The following resources, actually their URIs are predefined: .ie n .IP """io:stdin""" 4 .el .IP "\f(CWio:stdin\fR" 4 .IX Item "io:stdin" Symbolizes the \s-1UNIX STDIN\s0 file descriptor. The resource is all text content coming from this file. .ie n .IP """io:stdout""" 4 .el .IP "\f(CWio:stdout\fR" 4 .IX Item "io:stdout" Symbolizes the \s-1UNIX STDOUT\s0 file descriptor. .ie n .IP """null:""" 4 .el .IP "\f(CWnull:\fR" 4 .IX Item "null:" Symbolizes a resource which never delivers any content and which can consume any content silently (like \f(CW\*(C`/dev/null\*(C'\fR under \s-1UNIX\s0). .SS "Predefined \s-1URI\s0 Methods" .IX Subsection "Predefined URI Methods" .ie n .IP """inline""" 4 .el .IP "\f(CWinline\fR" 4 .IX Item "inline" An \fIinlined\fR resource is a resource which contains all content as part of the \s-1URI.\s0 Currently the \s-1TM\s0 content is to be written in AsTMa=. .Sp Example: .Sp .Vb 1 \& inlined:donald (duck) .Ve .SH "INTERFACE" .IX Header "INTERFACE" .SS "Methods" .IX Subsection "Methods" .IP "\fBurl\fR" 4 .IX Item "url" \&\fI\f(CI$url\fI\fR = \fI\f(CI$tm\fI\fR\->url .Sp \&\fI\f(CI$tm\fI\fR\->url (\fI\f(CI$url\fI\fR) .Sp Once an object of this class is instantiated it keeps the \s-1URL\s0 of the resource to which it is associated. With this method you can retrieve and set that. No special further action is taken otherwise. .IP "\fBmtime\fR" 4 .IX Item "mtime" \&\fI\f(CI$time\fI\fR = \fI\f(CI$tm\fI\fR\->mtime .Sp This function returns the \s-1UNIX\s0 time when the resource has been modified last. \f(CW0\fR is returned if the result cannot be determined. All methods from \s-1LWP\s0 are supported. .Sp Special resources are treated as follows: .RS 4 .ie n .IP """null:""" 4 .el .IP "\f(CWnull:\fR" 4 .IX Item "null:" always has mtime \f(CW0\fR .ie n .IP """io:stdin""" 4 .el .IP "\f(CWio:stdin\fR" 4 .IX Item "io:stdin" always has an mtime 1 second in the future. The idea is that \s-1STDIN\s0 always has new content. .ie n .IP """io:stdout""" 4 .el .IP "\f(CWio:stdout\fR" 4 .IX Item "io:stdout" always has mtime \f(CW0\fR. The idea is that \s-1STDOUT\s0 never changes by itself. .RE .RS 4 .RE .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1TM\s0 .SH "AUTHOR INFORMATION" .IX Header "AUTHOR INFORMATION" Copyright 200[67], Robert Barta , All rights reserved. .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. http://www.perl.com/perl/misc/Artistic.html