NAME

Net::RRP::Response - the base class for the Net::RRP::Response::* classes

SYNOPSIS

use Net::RRP::Response;
my $response = new Net::RRP::Response ();

DESCRIPTION

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.

new

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

newFromException

Construct new response object from exception infomation;

my $response = newFromException Net::RRP::Response ( new Net::RRP::Exception ( "description", $code ) );

getCode

This method return a code (number) of response. Must be overwrited at child classes. Example:

my $responseNumber = $response->getCode;

getDescription

Get response description. Example:

my $description = $response->getDescription();

setDescription

Set response description. Example:

$response->setDescription ( 'this is a response description' );

getAttribute

Return a named response attribute. Example:

my $attribute = $response->getAttribute ( 'name' );

setAttribute

Setup a named attribute. Example:

$response->setAttribute ( 'name' => 'value' );

getAttributes

Get response attributes hash ref. Example:

my $attributes = $response->getAttributes;
map { print "$_ = " . $attributes->{$_} } keys %$attributes;

AUTHOR AND COPYRIGHT

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.

SEE ALSO

Net::RRP::Entity(3), Net::RRP::Request(3), Net::RRP::Codec(3), Net::RRP::Exception(3), RFC 2832