| Net-RRP documentation | view source | Contained in the Net-RRP distribution. |
Net::RRP::Response - the base class for the Net::RRP::Response::* classes
use Net::RRP::Response; my $response = new Net::RRP::Response ();
This is a base class of all Response::* classes. Child class must overwrite a getCode method and setup own constrains for attributes at setAttribute method. Child classes must named Net::RRP::Response::nNNN, where NNN is a response number.
The constructor. You can setup attributes and description. Example:
use Net::RRP::Response;
my $response = new Net::RRP::Response ();
my $otherResponse = new Net::RRP::Response ( attributes => { qq => 'tt'},
description => 'this is a response description' );
Construct new response object from exception infomation;
my $response = newFromException Net::RRP::Response ( new Net::RRP::Exception ( "description", $code ) );
This method return a code (number) of response. Must be overwrited at child classes. Example:
my $responseNumber = $response->getCode;
Get response description. Example:
my $description = $response->getDescription();
Set response description. Example:
$response->setDescription ( 'this is a response description' );
Return a named response attribute. Example:
my $attribute = $response->getAttribute ( 'name' );
Setup a named attribute. Example:
$response->setAttribute ( 'name' => 'value' );
Get response attributes hash ref. Example:
my $attributes = $response->getAttributes;
map { print "$_ = " . $attributes->{$_} } keys %$attributes;
Net::RRP::Response (C) Michael Kulakov, Zenon N.S.P. 2000
125124, 19, 1-st Jamskogo polja st,
Moscow, Russian Federation
mkul@cpan.org
All rights reserved.
You may distribute this package under the terms of either the GNU
General Public License or the Artistic License, as specified in the
Perl README file.
Net::RRP::Entity(3), Net::RRP::Request(3), Net::RRP::Codec(3), Net::RRP::Exception(3), RFC 2832
| Net-RRP documentation | view source | Contained in the Net-RRP distribution. |