IO-EPP

 view release on metacpan or  search on metacpan

lib/IO/EPP/TCI.pm  view on Meta::CPAN

package IO::EPP::TCI;

=encoding utf8

=head1 NAME

IO::EPP::TCI

=head1 SYNOPSIS

    use IO::EPP::TCI;

    # Parameters for IO::Socket::SSL
    my %sock_params = (
        PeerHost        => 'uap.tcinet.ru',
        PeerPort        => 8130, # .дети 8130, .tatar 8131
        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::TCI->new( {
        user => 'XXX-DETI',
        pass => 'XXXXXXXX',
        sock_params => \%sock_params,
        server => 'afilias', # or pir, ...
        test_mode => 0, # real connect
    } );

    # Check domain
    my ( $answ, $code, $msg ) = $conn->check_domains( { domains => [ 'xn--80akfym3e.xn--d1acj3b' ] } );

    # Call logout() and destroy object
    undef $conn;

=head1 DESCRIPTION

Work with normal TCI EPP API

.дети/.xn--d1acj3b documents:
L<http://dotdeti.ru/foruser/docs/>, L<https://tcinet.ru/documents/deti/2TechPolitDeti.pdf>

.tatar documents:
L<http://domain.tatar/to-registars/documents.php>, L<https://tcinet.ru/documents/deti/2TechPolitTatar.pdf>

=cut

use IO::EPP::Base;
use parent qw( IO::EPP::Base );

use strict;
use warnings;

my $cont_ext =
'xmlns:contact="http://www.tcinet.ru/epp/tci-contact-ext-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tcinet.ru/epp/tci-contact-ext-1.0 tci-contact-ext-1.0.xsd"';

sub make_request {
    my ( $action, $params ) = @_;

    my ( $self, $code, $msg, $answ );

    unless ( $params->{conn} ) {
        $params->{sock_params}{PeerHost} ||= 'uap.tcinet.ru';
        $params->{sock_params}{PeerPort} ||= 8130; #  .дети, for .tatar need 8131

        ( $self, $code, $msg ) = __PACKAGE__->new( $params );

        unless ( $code  and  $code == 1000 ) {
            goto END_MR;
        }
    }
    else {



( run in 1.236 second using v1.01-cache-2.11-cpan-39bf76dae61 )