Net::RRP::Entity - rrp entity abstraction class
use Net::RRP::Entity; my $entity = new Net::RRP::Entity();
This is a base class for all Entity::* classes.
This is a constructor. Example:
use Net::RRP::Entity; my $entity = new Net::RRP::Entity(); my $entity1 = new Net::RRP::Entity( key => [ 'value' ] );
Return a *real* name of this entity. You must overwrite this method at child class. Example:
my $entityName = $entity->getName(); print STDERR "EntityName is $entityName\n";
Setup attribte with name $attributeName to a $attributeValue. $attributeValue must be a array ref. Example:
$entity->setAttribute ( $attributeName, $attributeValue ); $entity->setAttribute ( 'DomainName', [ 'test.ru' ] ); $entity->setAttribute ( 'NameServer', [ 'ns1.ttt.ru', 'ns2.qqq.ru' ] );
Return a value of $attributeName attribute. Example:
print STDERR $entity->getAttribute ( 'NameServer' )->[ 0 ];
Can throw Net::RRP::Exception::MissingRequiredAttribute exception
Return the hash ref of the all entity attributes. Example:
my $attributes = $entity->getAttributes(); foreach my $attributeName ( keys %$attributes ) { print $attributeName . ' ' . $attributes->{ $$attributeName }->[ 0 ]; }
return a "primary" attribute value
Net::RRP::Entity (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::Request(3), Net::RRP::Response(3), Net::RRP::Codec(3), RFC 2832, Net::RRP::Exception::MissingRequiredAttribute(3)
To install Net::RRP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::RRP
CPAN shell
perl -MCPAN -e shell install Net::RRP
For more information on module installation, please visit the detailed CPAN module installation guide.