NAME

Net::Trackback::Message - an object representing a Trackback message.

SYNOPSIS

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!';

METHODS

Net::Trackback::Message->new([$hashref])
Net::Trackback::Message->parse($xml)
$msg->code([$int])

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.

$msg->message([$message])

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.

$msg->is_success

Returns a boolean value indicating whether the message object represents a successful ping or not.

$msg->is_error

Returns a boolean value indicating whether the message object represents an error while pinging or not.

$msg->to_hash

Returns a hash of the object's current state.

$msg->to_xml

Returns an XML representation of the Trackback message that can be sent as a response to a client.

AUTHOR & COPYRIGHT

Please see the Net::Trackback manpage for author, copyright, and license information.

4 POD Errors

The following errors were encountered while parsing the POD:

Around line 54:

=begin without a target?

Around line 71:

'=item' outside of any '=over'

Around line 114:

You forgot a '=back' before '=head1'

Around line 121:

'=end' without a target?