Net::Trackback::Data - an object representing Trackback data to a pingable
resource.
use Net::Trackback::Data;
my $data = Net::Trackback::Data->new();
$data->url('http://www.timaoutloud.org/archives/000206.html');
$data->ping('http://www.timaoutloud.org/cgi/mt/mt-tb.cgi/105');
$data->title('The Next Generation of TrackBack: A Proposal');
$data->description('I thought it would be helpful to draft some
suggestions for consideration for the next generation (NG)
of the interface.');
print $data->to_rdf."\n";
- Net::Trackback::Data->new([$hashref])
- Constuctor method. It will initialize the object if passed a hash
reference. Recognized keys are title, identifier, subject, description,
creator, date, source, publisher, contributor, type, format, language,
relation, coverage, rights and ping. (These are all the Dublin Core
Metadata Element Set except for ping of course.) These keys correspond to
the methods like named methods.
- Net::Trackback::Data->parse($rdf)
- A method that parses (albeit crude using regex) Trackback data from a
string of RDF and returns a data object. In the event a bad or incomplete
data has been passed in the method will return
"undef". The error message can be
retreived with the "errstr" method. One
required parameter, a string containing RDF. See the list of recognized
keys in the new method.
NOTE: This module does not use a XML or RDF parser
therefore namespaces are not handled properly. The prefixes are assumed
to be fixed to a specific URI. This is consistent with the reference
implementation standalone Trackback code in which the module was
originally based.
- $data->identifier([$url])
- Accessor to the resource's URL that can be pinged. A value is required for
Trackback clients to process the data. If an optional parameter is passed
in the value is set.
- $data->ping([$url])
- Accessor to the ping URL of the resource. A value is required for
Trackback clients to process the data. If an optional parameter is passed
in the value is set.
- $data->title([$title])
- $data->subject([$subject])
- $data->description([$description])
- $data->creator([$creator])
- $data->date([$date])
- $data->source([$source])
- $data->publisher([$publisher])
- $data->contributor([$contributor])
- $data->type([$type])
- $data->format([$format])
- $data->language([$language])
- $data->relation([$relation])
- $data->coverage([$coverage])
- $data->rights([$rights])
- Accessor methods to the remaining Dublin Core Metadata Element Set. If an
optional parameter is passed in the value is set. All are optional for
Trackback client discovery. Use as needed. (Title and description are
highly recommended by this modules author.)
- $data->to_hash
- Returns a hash of the object's current state.
- $data->to_rdf
- Returns an RDF representation of the object metadata that can be inserted
into an (X)HTML page for discovery by Trackback clients.
This module is a subclass of Class::ErrorHandler and inherits two methods for
passing error message back to a caller.
- Class->error($message)
- $object->error($message)
- Sets the error message for either the class Class or the object
$object to the message
$message. Returns undef.
- Class->errstr
- $object->errstr
- Accesses the last error message set in the class Class or the object
$object, respectively, and returns that error
message.
Dublin Core Metadata Element Set, Version 1.1: Reference Description
<http://dublincore.org/documents/dces/>
TrackBack Module for RSS 1.0/2.0:
<http://madskills.com/public/xml/rss/module/trackback/>
Please see the Net::Trackback manpage for author, copyright, and license
information.
Hey! The above document had some coding errors, which are explained
below:
- Around line 98:
- =begin without a target?
- Around line 119:
- '=item' outside of any '=over'
- Around line 198:
- You forgot a '=back' before '=head2'
- Around line 203:
- '=item' outside of any '=over'
- Around line 217:
- You forgot a '=back' before '=head1'
- Around line 232:
- '=end' without a target?