A module to export some constants that correspond to epp response codes
use Net::EPP::ResponseCodes; use Net::EPP::Simple; use strict; my $epp = Net::EPP::Simple->new( host => 'epp.nic.tld', user => 'my-id', pass => 'my-password', ); my $result = $epp->domain_transfer_request('example.tld', 'foobar', 1); if ($result) { print "Transfer initiated OK\n"; } else { if ($Net::EPP::Simple::Code == OBJECT_PENDING_TRANSFER) { print "Error: domain is already pending transfer\n"; } elsif ($Net::EPP::Simple::Code == INVALID_AUTH_INFO) { print "Error: invalid authcode provided\n"; } elsif ($Net::EPP::Simple::Code == OBJECT_DOES_NOT_EXIST) { print "Error: domain not found\n"; } elsif ($Net::EPP::Simple::Code == STATUS_PROHIBITS_OP) { print "Error: domain cannot be transferred\n"; } else { print "Error code $Net::EPP::Simple::Code\n"; } }
\s-1EPP\s0 is the Extensible Provisioning Protocol. \s-1EPP\s0 (defined in \s-1RFC\s0 4930) is an application layer client-server protocol for the provisioning and management of objects stored in a shared central repository. Specified in \s-1XML\s0, the protocol defines generic object management operations and an extensible framework that maps protocol operations to objects. As of writing, its only well-developed application is the provisioning of Internet domain names, hosts, and related contact details.
Every response sent to the client by an \s-1EPP\s0 server contains a \*(C`<result>\*(C' element that has a \*(C`code\*(C' attribute. This is a four-digit numeric code that describes the result of the request. This module exports a set of constants that provide handy mnemonics for each of the defined codes.
\*(C`Net::EPP::ResponseCodes\*(C' exports the following constants. The number in brackets is the integer value associated with the constant.
Protocol Syntax
Implementation-specific Rules
Security (22nn)
Data Management (23nn)
Server System (24nn)
Connection Management (25nn)
CentralNic Ltd (<http://www.centralnic.com/>).
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Net::EPP::Client
Net::EPP::Frame
Net::EPP::Proxy
RFCs 4930 and \s-1RFC\s0 4934, available from <http://www.ietf.org/>.
The CentralNic \s-1EPP\s0 site at <http://www.centralnic.com/resellers/epp>.