Net-EPP
view release on metacpan or search on metacpan
},
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
"requires" : {
"Digest::SHA" : "0",
"IO::Socket::IP" : "0",
"IO::Socket::SSL" : "0",
"List::Util" : "0",
"Time::HiRes" : "0",
"XML::LibXML" : "0"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/gbxyz/perl-net-epp/issues"
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Net-EPP
no_index:
directory:
- t
- inc
requires:
Digest::SHA: '0'
IO::Socket::IP: '0'
IO::Socket::SSL: '0'
List::Util: '0'
Time::HiRes: '0'
XML::LibXML: '0'
resources:
bugtracker: https://github.com/gbxyz/perl-net-epp/issues
repository: https://github.com/gbxyz/perl-net-epp.git
version: '0.28'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
Makefile.PL view on Meta::CPAN
use strict;
WriteMakefile(
'NAME' => 'Net::EPP',
'VERSION_FROM' => 'lib/Net/EPP.pm',
'ABSTRACT_FROM' => 'lib/Net/EPP.pm',
'AUTHOR' => ['Gavin Brown <gavin.brown@fastmail.uk>'],
'LICENSE' => 'perl',
'PREREQ_PM' => {
'Digest::SHA' => 0,
'IO::Socket::SSL' => 0,
'IO::Socket::IP' => 0,
'List::Util' => 0,
'Time::HiRes' => 0,
'XML::LibXML' => 0,
},
'META_MERGE' => {
'meta-spec' => {'version' => 2},
'resources' => {
'repository' => {
'type' => 'git',
lib/Net/EPP/Client.pm view on Meta::CPAN
package Net::EPP::Client;
use Carp;
use IO::Socket::IP;
use IO::Socket::SSL;
use Net::EPP::Parser;
use Net::EPP::Frame::Response;
use Net::EPP::Protocol;
use bytes;
use strict;
use warnings;
=pod
=head1 NAME
lib/Net/EPP/Client.pm view on Meta::CPAN
MANDATORY. Specifies the computer to connect to. This may be a DNS hostname or
an IP address. If a hostname is provided, IPv6 will be used if available.
=item * C<port>
OPTIONAL. Specifies the TCP port to connect to. This defaults to C<700>.
=item * C<ssl>
OPTIONAL. If the value of this parameter is false, then a plaintext
connection will be created. Otherwise, L<IO::Socket::SSL> will be used to
provide an encrypted connection.
=item * C<frames>
DEPRECATED. If the value of this parameter is false, then the C<request()> and
C<get_frame()> methods (see below) will return strings instead of
C<Net::EPP::Frame::Response> objects.
=back
lib/Net/EPP/Client.pm view on Meta::CPAN
=pod
=head1 METHODS
=head2 CONNECTING TO A SERVER
my $greeting = $epp->connect(%PARAMS);
This method establishes the TCP connection. You can use the C<%PARAMS> hash to
specify arguments that will be passed on to the constructors for
L<IO::Socket::IP> (such as a timeout) or L<IO::Socket::SSL> (such as
certificate information). Which of these modules will be used is determined by
the C<ssl> parameter that was provided when instantiating the object. See the
relevant manpage for examples.
This method will C<croak()> if connection fails, so be sure to use C<eval()> if
you want to catch the error.
By default, 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).
lib/Net/EPP/Client.pm view on Meta::CPAN
$self->_connect_tcp(%params);
}
return ($params{'no_greeting'} ? 1 : $self->get_frame);
}
sub _connect_tcp {
my ($self, %params) = @_;
my $class = ($self->{'ssl'} == 1 ? 'IO::Socket::SSL' : 'IO::Socket::IP');
$self->{'connection'} = $class->new(
'PeerAddr' => $self->{'host'},
'PeerPort' => $self->{'port'},
'Proto' => 'tcp',
'Type' => SOCK_STREAM,
%params
);
if (!defined($self->{'connection'}) || ($@ && $@ ne '')) {
( run in 0.550 second using v1.01-cache-2.11-cpan-4d50c553e7e )