| Net-RRP documentation | Contained in the Net-RRP distribution. |
Net::RRP::Request::Mod - rrp mod request representation.
use Net::RRP::Request::Mod;
my $modRequest = new Net::RRP::Request::Mod
( entity => new Net::RRP::Entity::Domain
( DomainName => [ 'domain.ru' ],
NameServer => [ 'ns1.domain.ru' ] ) );
my $modRequest1 = new Net::RRP::Request::Mod ();
$modRequest1->setEntity ( new Net::RRP::Entity::Domain
( DomainName => [ 'domain.ru' ],
NameServer => [ 'ns1.domain.ru' ] ) );
This is a rrp mod request representation class.
return a 'Mod'
throw Net::RRP::Exception::InvalidEntityValue unless entity is Net::RRP::Entity::Domain or Net::RRP::Entity::NameServer
Support for Registrar and Serial options, throw Net::RRP::Exception::InvalidCommandOption if other option
Net::RRP::Request::Mod (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::Codec(3), Net::RRP::Entity::Domain(3), Net::RRP::Entity::NameServer(3), RFC 2832, Net::RRP::Exception::InvalidCommandOption(3), Net::RRP::Exception::InvalidEntityValue(3)
| Net-RRP documentation | Contained in the Net-RRP distribution. |
package Net::RRP::Request::Mod; use strict; use Net::RRP::Request; use Net::RRP::Exception::InvalidCommandOption; use Net::RRP::Exception::InvalidEntityValue; @Net::RRP::Request::Mod::ISA = qw(Net::RRP::Request); $Net::RRP::Request::Mod::VERSION = '0.1';
sub getName { 'Mod' };
sub setEntity { my ( $this, $entity ) = @_; my $ref = ref ( $entity ) || throw Net::RRP::Exception::InvalidEntityValue (); { 'Net::RRP::Entity::Domain' => 1, 'Net::RRP::Entity::NameServer' => 1, 'Net::RRP::Entity::Registrar' => 1, 'Net::RRP::Entity::Replica' => 1, 'Net::RRP::Entity::Owner' => 1, 'Net::RRP::Entity::Contact' => 1 }->{ $ref } || throw Net::RRP::Exception::InvalidEntityValue (); $this->SUPER::setEntity ( $entity ); }
sub setOption { my ( $this, $key, $value ) = @_; return $this->SUPER::setOption ( $key => $value ) if lc ( $key ) eq 'registrar'; return $this->SUPER::setOption ( $key => $value ) if lc ( $key ) eq 'serial'; throw Net::RRP::Exception::InvalidCommandOption () }
1; __END__