r70781 - in /branches/upstream/libnet-epp-perl/current/lib/Net: ./ EPP/ EPP/Frame/Command/ EPP/Frame/Command/Create/ EPP/Frame/Command/Renew/ EPP/Frame/Command/Update/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Mon Mar 7 04:09:01 UTC 2011
Author: jawnsy-guest
Date: Mon Mar 7 04:08:05 2011
New Revision: 70781
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70781
Log:
[svn-upgrade] new version libnet-epp-perl (0.16)
Added:
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/Domain.pm
Modified:
branches/upstream/libnet-epp-perl/current/lib/Net/EPP.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Client.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Contact.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Domain.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Host.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Contact.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Domain.pm
branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Simple.pm
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP.pm Mon Mar 7 04:08:05 2011
@@ -12,6 +12,60 @@
use Net::EPP::Simple;
use strict;
-our $VERSION = '0.15';
+our $VERSION = '0.16';
1;
+
+__END__
+
+=pod
+
+=head1 NAME
+
+C<Net::EPP> - a Perl library for the Extensible Provisioning Protocol (EPP)
+
+=head1 DESCRIPTION
+
+EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 5730)
+is an application layer client-server protocol for the provisioning and
+management of objects stored in a shared central repository. Specified
+in XML, 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.
+
+This project offers a number of Perl modules which implement various
+EPP-related functions:
+
+=over
+
+=item * a low level protocol implementation (L<Net::EPP::Protocol>)
+
+=item * a low-level client (L<Net::EPP::Client>)
+
+=item * a high-level client (L<Net::EPP::Simple>)
+
+=item * an EPP frame builder (L<Net::EPP::Frame>)
+
+=item * a utility library to export EPP responde codes (L<Net::EPP::ResponseCodes>)
+
+=back
+
+These modules were originally created and maintained by CentralNic for
+use by their own registrars, but since their original release have
+become widely used by registrars and registries of all kinds.
+
+CentralNic has chosen to create this project to allow interested third
+parties to contribute to the development of these libraries, and to
+guarantee their long-term stability and maintenance.
+
+=head1 AUTHOR
+
+CentralNic Ltd (L<http://www.centralnic.com/>).
+
+=head1 COPYRIGHT
+
+This module is (c) 2010 CentralNic Ltd. This module is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=cut
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Client.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Client.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Client.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Client.pm Mon Mar 7 04:08:05 2011
@@ -185,7 +185,7 @@
This method will C<croak()> if connection fails, so be sure to use C<eval()> if
you want to catch the error.
-The return value for C<connect()> will be the EPP C<E<lt>greetingE<gt>> frame
+The return value for C<connect()> will be the EPP E<lt>greetingE<gt> frame
returned by the server. Please note that the same caveat about blocking applies
to this method as to C<get_frame()> (see below).
@@ -237,7 +237,7 @@
%params
);
- croak("Connection to $self->{'host'}:$self->{'port'} failed: \"$@\"") if (!defined($self->{'connection'}) || ($@ && $@ ne ''));
+ croak("Connection to $self->{'host'}:$self->{'port'} failed: $@") if (!defined($self->{'connection'}) || ($@ && $@ ne ''));
return 1;
@@ -390,7 +390,7 @@
$epp->disconnect;
This closes the connection. An EPP server should always close a connection after
-a C<E<lt>logoutE<gt>> frame has been received and acknowledged; this method
+a E<lt>logoutE<gt> frame has been received and acknowledged; this method
is provided to allow you to clean up on the client side, or close the
connection out of sync with the server.
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Contact.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Contact.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Contact.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Contact.pm Mon Mar 7 04:08:05 2011
@@ -20,7 +20,7 @@
use Net::EPP::Frame::Command::Create::Contact;
use strict;
- my $check = Net::EPP::Frame::Command::Create::Contact->new;
+ my $create = Net::EPP::Frame::Command::Create::Contact->new;
$create->setContact('contact-id);
print $create->toString(1);
@@ -99,7 +99,7 @@
sub setAuthInfo {
my ($self, $authInfo) = @_;
my $el = $self->addEl('authInfo');
- my $pw = $self->createElement('pw');
+ my $pw = $self->createElement('contact:pw');
$pw->appendText($authInfo);
$el->appendChild($pw);
return $el;
@@ -133,7 +133,7 @@
}
$el->appendChild($nel);
- $el->appendChild($oel);
+ $el->appendChild($oel) if $org;
$el->appendChild($ael);
return $el;
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Domain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Domain.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Domain.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Domain.pm Mon Mar 7 04:08:05 2011
@@ -20,7 +20,7 @@
use Net::EPP::Frame::Command::Create::Domain;
use strict;
- my $check = Net::EPP::Frame::Command::Create::Domain->new;
+ my $create = Net::EPP::Frame::Command::Create::Domain->new;
$create->setDomain('example.uk.com);
print $create->toString(1);
@@ -202,7 +202,7 @@
sub setAuthInfo {
my ($self, $authInfo) = @_;
my $el = $self->addEl('authInfo');
- my $pw = $self->createElement('pw');
+ my $pw = $self->createElement('domain:pw');
$pw->appendText($authInfo);
$el->appendChild($pw);
return $el;
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Host.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Host.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Host.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Create/Host.pm Mon Mar 7 04:08:05 2011
@@ -9,3 +9,22 @@
use strict;
1;
+
+=pod
+
+=head1 NAME
+
+Net::EPP::Frame::Command::Create::Host - an instance of L<Net::EPP::Frame::Command::Create>
+for host objects.
+
+=head1 OBJECT HIERARCHY
+
+ L<XML::LibXML::Node>
+ +----L<XML::LibXML::Document>
+ +----L<Net::EPP::Frame>
+ +----L<Net::EPP::Frame::Command>
+ +----L<Net::EPP::Frame::Command::Create>
+ +----L<Net::EPP::Frame::Command::Create::Host>
+
+=cut
+
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew.pm Mon Mar 7 04:08:05 2011
@@ -4,6 +4,7 @@
#
# $Id: Renew.pm,v 1.3 2007/12/03 11:44:52 gavin Exp $
package Net::EPP::Frame::Command::Renew;
+use Net::EPP::Frame::Command::Renew::Domain;
use base qw(Net::EPP::Frame::Command);
use strict;
Added: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/Domain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/Domain.pm?rev=70781&op=file
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/Domain.pm (added)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Renew/Domain.pm Mon Mar 7 04:08:05 2011
@@ -1,0 +1,151 @@
+# Copyright (c) 2010 CentralNic Ltd. All rights reserved. This program is
+# free software; you can redistribute it and/or modify it under the same
+# terms as Perl itself.
+#
+# $Id: Domain.pm,v 1.1 2007/12/03 11:44:52 gavin Exp $
+package Net::EPP::Frame::Command::Renew::Domain;
+use base qw(Net::EPP::Frame::Command::Renew);
+use Net::EPP::Frame::ObjectSpec;
+use strict;
+
+
+=pod
+
+=head1 NAME
+
+Net::EPP::Frame::Command::Renew::Domain - an instance of L<Net::EPP::Frame::Command::Renew>
+for domain objects.
+
+=head1 SYNOPSIS
+
+ use Net::EPP::Frame::Command::Renew::Domain;
+ use strict;
+
+ my $info = Net::EPP::Frame::Command::Renew::Domain->new;
+ $info->setDomain('example.tld');
+
+ print $info->toString(1);
+
+This results in an XML document like this:
+
+ <?xml version="1.0" encoding="UTF-8"?>
+ <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:ietf:params:xml:ns:epp-1.0
+ epp-1.0.xsd">
+ <command>
+ <renew>
+ <domain:renew
+ xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"
+ xsi:schemaLocation="urn:ietf:params:xml:ns:domain-1.0
+ domain-1.0.xsd">
+ <domain:name>example.tldE<lt>/domain:name>
+ </domain:renew>
+ </renew>
+ <clTRID>0cf1b8f7e14547d26f03b7641660c641d9e79f45</clTRIDE<gt>
+ </command>
+ </epp>
+
+=head1 OBJECT HIERARCHY
+
+ L<XML::LibXML::Node>
+ +----L<XML::LibXML::Document>
+ +----L<Net::EPP::Frame>
+ +----L<Net::EPP::Frame::Command>
+ +----L<Net::EPP::Frame::Command::Renew>
+ +----L<Net::EPP::Frame::Command::Renew::Domain>
+
+=cut
+
+sub new {
+ my $package = shift;
+ my $self = bless($package->SUPER::new('renew'), $package);
+
+ my $domain = $self->addObject(Net::EPP::Frame::ObjectSpec->spec('domain'));
+
+ return $self;
+}
+
+=pod
+
+=head1 METHODS
+
+ $frame->setDomain('example.tld');
+
+This method specifies the domain name for the renew.
+
+=cut
+
+sub setDomain {
+ my ($self, $domain) = @_;
+
+ my $name = $self->createElement('domain:name');
+ $name->appendText($domain);
+
+ $self->getNode('renew')->getChildNodes->shift->appendChild($name);
+
+ return 1;
+}
+
+
+=pod
+
+ $frame->period($years);
+
+This sets the optional renewal period.
+
+=cut
+
+sub setPeriod {
+ my ($self, $years) = @_;
+
+ my $period = $self->createElement('domain:period');
+ $period->setAttribute('unit', 'y');
+ $period->appendText($years);
+
+ $self->getNode('renew')->getChildNodes->shift->appendChild($period);
+
+ return 1;
+}
+
+=pod
+
+ $frame->setCurExpDate($date)
+
+This sets the current expiry date for the domain.
+
+=cut
+
+sub setCurExpDate {
+ my ($self, $date) = @_;
+
+ my $cur = $self->createElement('domain:curExpDate');
+ $cur->appendText($date);
+ $self->getNode('renew')->getChildNodes->shift->appendChild($cur);
+
+ return 1;
+}
+
+
+=pod
+
+=head1 AUTHOR
+
+CentralNic Ltd (http://www.centralnic.com/).
+
+=head1 COPYRIGHT
+
+This module is (c) 2007 CentralNic Ltd. This module is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+=over
+
+=item * L<Net::EPP::Frame>
+
+=back
+
+=cut
+
+1;
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Contact.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Contact.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Contact.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Contact.pm Mon Mar 7 04:08:05 2011
@@ -21,7 +21,7 @@
use strict;
my $info = Net::EPP::Frame::Command::Update::Contact->new;
- $info->setID('REG-12345');
+ $info->setContact('REG-12345');
print $info->toString(1);
@@ -86,7 +86,8 @@
my $el = $self->createElement('contact:id');
$el->appendText($id);
- $self->getNode('update')->getChildNodes->shift->appendChild($el);
+ my $n = $self->getNode('update')->getChildNodes->shift;
+ $n->insertBefore( $el, $n->firstChild );
return 1;
}
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Domain.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Domain.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Domain.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Frame/Command/Update/Domain.pm Mon Mar 7 04:08:05 2011
@@ -86,7 +86,8 @@
my $name = $self->createElement('domain:name');
$name->appendText($domain);
- $self->getNode('update')->getChildNodes->shift->appendChild($name);
+ my $n = $self->getNode('update')->getChildNodes->shift;
+ $n->insertBefore( $name, $n->firstChild );
return 1;
}
Modified: branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Simple.pm?rev=70781&op=diff
==============================================================================
--- branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Simple.pm (original)
+++ branches/upstream/libnet-epp-perl/current/lib/Net/EPP/Simple.pm Mon Mar 7 04:08:05 2011
@@ -22,11 +22,11 @@
=pod
-=head1 NAME
+=head1 Name
Net::EPP::Simple - a simple EPP client interface for the most common jobs
-=head1 SYNOPSIS
+=head1 Synopsis
#!/usr/bin/perl
use Net::EPP::Simple;
@@ -49,7 +49,7 @@
}
-=head1 DESCRIPTION
+=head1 Description
EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an
application layer client-server protocol for the provisioning and management of
@@ -66,7 +66,7 @@
It is based on the C<Net::EPP::Client> module and uses C<Net::EPP::Frame>
to build request frames.
-=head1 CONSTRUCTOR
+=head1 Constructor
The constructor for C<Net::EPP::Simple> has the same general form as the
one for C<Net::EPP::Client>, but with the following exceptions:
@@ -81,14 +81,114 @@
=item * The C<timeout> parameter controls how long the client waits for a response from the server before returning an error.
+=item * if C<debug> is set, C<Net::EPP::Simple> will output verbose debugging information on C<STDERR>, including all frames sent to and received from the server.
+
+=item * C<reconnect> can be used to disable automatic reconnection (it is enabled by default). Before sending a frame to the server, C<Net::EPP::Simple> will send a C<E<lt>helloE<gt>> to check that the connection is up, if not, it will try to reconnect, aborting after the I<n>th time, where I<n> is the value of C<reconnect> (the default is 3).
+
=back
The constructor will establish a connection to the server and retrieve the
-greeting (which is available via C<$epp-E<gt>{greeting}>) and then send a
-C<E<lt>loginE<gt>> request.
+greeting (which is available via $epp-E<gt>{greeting}) and then send a
+E<lt>loginE<gt> request.
If the login fails, the constructor will return C<undef> and set
C<$Net::EPP::Simple::Error> and C<$Net::EPP::Simple::Code>.
+
+=head2 Client and Server SSL options
+
+RFC 5730 requires that all EPP instances must be protected using "mutual,
+strong client-server authentication". In practice, this means that both
+client and server must present an SSL certificate, and that they must
+both verify the certificate of their peer.
+
+=head3 Server Certificate Verification
+
+C<Net::EPP::Simple> will verify the certificate presented by a server if
+the C<verify>, and either C<ca_file> or C<ca_path> are passed to the
+constructor:
+
+ my $epp = Net::EPP::Simple->new(
+ host => 'epp.nic.tld',
+ user => 'my-id',
+ pass => 'my-password',
+ verify => 1,
+ ca_file => '/etc/pki/tls/certs/ca-bundle.crt',
+ ca_path => '/etc/pki/tls/certs',
+ );
+
+C<Net::EPP::Simple> will fail to connect to the server if the
+certificate is not valid.
+
+=head3 SSL Cipher Selection
+
+You can restrict the ciphers that you will use to connect to the server
+by passing a C<ciphers> parameter to the constructor. This is a colon-
+separated list of cipher names and aliases. See L<http://www.openssl.org/docs/apps/ciphers.html#CIPHER_STRINGS>
+for further details. As an example, the following cipher list is
+suggested for clients who wish to ensure high-security connections to
+servers:
+
+ HIGH:!ADH:!MEDIUM:!LOW:!SSLv2:!EXP
+
+=head3 Client Certificates
+
+If you are connecting to an EPP server which requires a client
+certificate, you can configure C<Net::EPP::Simple> to use one as
+follows:
+
+ my $epp = Net::EPP::Simple->new(
+ host => 'epp.nic.tld',
+ user => 'my-id',
+ pass => 'my-password',
+ key => '/path/to/my.key',
+ cert => '/path/to/my.crt',
+ passphrase => 'foobar123',
+ );
+
+C<key> is the filename of the private key, C<cert> is the filename of
+the certificate. If the private key is encrypted, the C<passphrase>
+parameter will be used to decrypt it.
+
+=head2 Configuration File
+
+C<Net::EPP::Simple> supports the use of a simple configuration file. To
+use this feature, you need to install the L<Config::Simple> module.
+
+When starting up, C<Net::EPP::Simple> will look for
+C<$HOME/.net-epp-simple-rc>. This file is an ini-style configuration
+file.
+
+=head3 Default Options
+
+You can specify default options for all EPP servers using the C<[default]>
+section:
+
+ [default]
+ default=epp.nic.tld
+ debug=1
+
+=head3 Server Specific Options
+
+You can specify options for for specific EPP servers by giving each EPP server
+its own section:
+
+ [epp.nic.tld]
+ user=abc123
+ pass=foo2bar
+ port=777
+ ssl=0
+
+This means that when you write a script that uses C<Net::EPP::Simple>, you can
+do the following:
+
+ # config file has a default server:
+ my $epp = Net::EPP::Simple->new;
+
+ # config file has connection options for this EPP server:
+ my $epp = Net::EPP:Simple->new('host' => 'epp.nic.tld');
+
+Any parameters provided to the constructor will override those in the config
+file.
=cut
@@ -137,6 +237,13 @@
$self->{authenticated} = undef;
$self->{connect} = (exists($params{connect}) ? $params{connect} : 1);
$self->{login} = (exists($params{login}) ? $params{login} : 1);
+ $self->{key} = $params{key};
+ $self->{cert} = $params{cert};
+ $self->{key_passphrase} = $params{key_passphrase};
+ $self->{verify} = $params{verify};
+ $self->{ca_file} = $params{ca_file};
+ $self->{ca_path} = $params{ca_path};
+ $self->{ciphers} = $params{ciphers};
bless($self, $package);
@@ -152,9 +259,27 @@
sub _connect {
my ($self, $login) = @_;
+ my %params;
+
+ $params{SSL_cipher_list} = $self->{ciphers} if (defined($self->{ssl}) && defined($self->{ciphers}));
+
+ if (defined($self->{key}) && defined($self->{cert}) && defined($self->{ssl})) {
+ $self->debug('configuring client certificate parameters');
+ $params{SSL_key_file} = $self->{key};
+ $params{SSL_cert_file} = $self->{cert};
+ $params{SSL_passwd_cb} = sub { $self->{key_passphrase} };
+ }
+
+ if (defined($self->{ssl}) && defined($self->{verify})) {
+ $self->debug('configuring server verification');
+ $params{SSL_verify_mode} = 0x01;
+ $params{SSL_ca_file} = $self->{ca_file};
+ $params{SSL_ca_path} = $self->{ca_path};
+ }
+
$self->debug(sprintf('Attempting to connect to %s:%d', $self->{host}, $self->{port}));
eval {
- $self->{greeting} = $self->connect;
+ $self->{greeting} = $self->connect(%params);
};
if ($@ ne '' || ref($self->{greeting}) ne 'Net::EPP::Frame::Response') {
chomp($@);
@@ -198,10 +323,15 @@
$login->svcs->appendChild($el);
}
$objects = $self->{greeting}->getElementsByTagNameNS(EPP_XMLNS, 'extURI');
+ my $svcext;
+ if ($objects->size) {
+ $svcext = $login->createElement('svcExtension');
+ $login->svcs->appendChild($svcext);
+ }
while (my $object = $objects->shift) {
- my $el = $login->createElement('objURI');
+ my $el = $login->createElement('extURI');
$el->appendText($object->firstChild->data);
- $login->svcs->appendChild($el);
+ $svcext->appendChild($el);
}
$self->debug(sprintf("Attempting to login as client ID '%s'", $self->{user}));
@@ -332,7 +462,7 @@
C<$Net::EPP::Simple::Error> and C<$Net::EPP::Simple::Code>.
If C<$authInfo> is defined, it will be sent to the server as per RFC
-4931, Section 3.1.2 and RRC 4933, Section 3.1.2. If the supplied
+5731, Section 3.1.2 and RFC 5733, Section 3.1.2. If the supplied
authInfo code is validated by the registry, additional information will
appear in the response. If it is invalid, you should get an error.
@@ -939,7 +1069,7 @@
$frame->setPeriod($domain->{'period'});
$frame->setRegistrant($domain->{'registrant'});
$frame->setContacts($domain->{'contacts'});
- $frame->setNS(@{$domain->{'ns'}});
+ $frame->setNS(@{$domain->{'ns'}}) if $domain->{'ns'} and @{$domain->{'ns'}};
$frame->setAuthInfo($domain->{authInfo}) if ($domain->{authInfo} ne '');
@@ -974,10 +1104,6 @@
my $frame = Net::EPP::Frame::Command::Create::Contact->new;
$frame->setContact($contact->{id});
- $frame->setEmail($contact->{email});
- $frame->setVoice($contact->{voice}) if ($contact->{voice} ne '');
- $frame->setFax($contact->{fax}) if ($contact->{fax} ne '');
- $frame->setAuthInfo($contact->{authInfo}) if ($contact->{authInfo} ne '');
if (ref($contact->{postalInfo}) eq 'HASH') {
foreach my $type (keys(%{$contact->{postalInfo}})) {
@@ -989,6 +1115,11 @@
);
}
}
+
+ $frame->setVoice($contact->{voice}) if ($contact->{voice} ne '');
+ $frame->setFax($contact->{fax}) if ($contact->{fax} ne '');
+ $frame->setEmail($contact->{email});
+ $frame->setAuthInfo($contact->{authInfo}) if ($contact->{authInfo} ne '');
if (ref($contact->{status}) eq 'ARRAY') {
foreach my $status (grep { /^client/ } @{$contact->{status}}) {
@@ -1322,13 +1453,13 @@
be set to 2400 (C<COMMAND_FAILED>). See L<Net::EPP::ResponseCodes> for
more information about thes codes.
-=head1 AUTHOR
+=head1 Author
CentralNic Ltd (L<http://www.centralnic.com/>).
-=head1 COPYRIGHT
-
-This module is (c) 2007 CentralNic Ltd. This module is free software; you can
+=head1 Copyright
+
+This module is (c) 2011 CentralNic Ltd. This module is free software; you can
redistribute it and/or modify it under the same terms as Perl itself.
=head1 SEE ALSO
@@ -1341,9 +1472,9 @@
=item * L<Net::EPP::Proxy>
-=item * RFCs 4930 and RFC 4934, available from L<http://www.ietf.org/>.
-
-=item * The CentralNic EPP site at L<http://www.centralnic.com/resellers/epp>.
+=item * RFCs 5730 and RFC 4934, available from L<http://www.ietf.org/>.
+
+=item * The CentralNic EPP site at L<http://www.centralnic.com/registrars/epp>.
=back
More information about the Pkg-perl-cvs-commits
mailing list