IO-EPP
view release on metacpan or search on metacpan
lib/IO/EPP/CNic.pm view on Meta::CPAN
package IO::EPP::CNic;
=encoding utf8
=head1 NAME
IO::EPP::CNic
=head1 SYNOPSIS
use IO::EPP::CNic;
# Parameters for IO::Socket::SSL
my %sock_params = (
PeerHost => 'epp.centralnic.com',
PeerPort => 700,
SSL_key_file => 'key_file.pem',
SSL_cert_file => 'cert_file.pem',
Timeout => 30,
);
# Create object, get greeting and call login()
my $conn = IO::EPP::CNic->new( {
user => 'H1234567',
pass => 'XXXXXXXX',
sock_params => \%sock_params,
test_mode => 0, # real connect
} );
# Check domain
my ( $answ, $code, $msg ) = $conn->check_domains( { domains => [ 'xyz.xyz' ] } );
# Call logout() and destroy object
undef $conn;
=head1 DESCRIPTION
Work with CentralNic APP API,
Overrides the IO::EPP::Base functions where the provider has supplemented the standard
The main documentation is in https://registrar-console.centralnic.com/doc/operations-manual-3.2.6.pdf
Other see on https://registrar-console.centralnic.com/support/documentation
(Authorization required)
=cut
use IO::EPP::Base;
use parent qw( IO::EPP::Base );
use strict;
use warnings;
sub make_request {
my ( $action, $params ) = @_;
my ( $self, $code, $msg, $answ );
unless ( $params->{conn} ) {
$params->{sock_params}{PeerHost} ||= 'epp.centralnic.com';
$params->{sock_params}{PeerPort} ||= 700;
( $self, $code, $msg ) = __PACKAGE__->new( $params );
unless ( $code and $code == 1000 ) {
goto END_MR;
}
}
else {
$self = $params->{conn};
}
( run in 1.753 second using v1.01-cache-2.11-cpan-75ffa21a3d4 )