Net::Trackback::Message - an object representing a Trackback message.
use Net::Trackback::Message; my $msg = Net::Trackback::Message->new(); $msg->code(1); $msg->message("Live and let foo.") print $msg->to_xml; print $msg->is_success ? 'go.' : 'stop!';
Constuctor method. It will initialize the object if passed a hash reference. Recognized keys are code and message. These keys correspond to the methods like named methods.
A method that parses (albeit crude using regex) a Trackback message and returns a message object. In the event a bad or incomplete message 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 the message XML.
An accessor to the message code, an integer. If an optional parameter is passed in the value is set.
The Trackback specification only defines to codes 0 (success) and 1 (error). This module takes the liberty of passing an HTTP error code instead of just a 1 if one occurs during processing.
An accessor to the body of the message. If an optional parameter is passed in the value is set.
The Trackback specification does not define specific message strings. They are generally treated as text to display or log. The message body is not required when sending especially when it is a successful (code 0) ping, but its a good idea to include as informative a message as possible.
Returns a boolean value indicating whether the message object represents a successful ping or not.
Returns a boolean value indicating whether the message object represents an error while pinging or not.
Returns a hash of the object's current state.
Returns an XML representation of the Trackback message that can be sent as a response to a client.
This module is a subclass of Class::ErrorHandler and inherits two methods for passing error message back to a caller.
Sets the error message for either the class Class or the object $object to the message $message. Returns undef.
Accesses the last error message set in the class Class or the object $object, respectively, and returns that error message.
Please see the Net::Trackback manpage for author, copyright, and license information.