IO-EPP

 view release on metacpan or  search on metacpan

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

package IO::EPP::Afilias;

=encoding utf8

=head1 NAME

IO::EPP::Afilias

=head1 SYNOPSIS

    use IO::EPP::Afilias;

    # Parameters for IO::Socket::SSL
    my %sock_params = (
        PeerHost        => 'epp.afilias.net',
        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::Afilias->new( {
        user => '12345-XX',
        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 => [ 'org.info' ] } );

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

=head1 DESCRIPTION

working with registries that have Afilias backend.

Frontends: Afilias, PIR, DotAsia, ...

Feature: at the initial request, you must specify the server parameter for activation the necessary extensions.

Now it is C<afilias> or C<pir>.

=head1 AUTHORS

Vadim Likhota <vadiml@cpan.org>

=cut

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

use strict;
use warnings;


my $rgp_ext = 'xmlns:rgp="urn:ietf:params:xml:ns:rgp-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:ietf:params:xml:ns:rgp-1.0 rgp-1.0.xsd"';

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

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

    unless ( $params->{conn} ) {
        $params->{sock_params}{PeerHost} ||= 'epp.afilias.net';
        $params->{sock_params}{PeerPort} ||= 700;

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

        unless ( $code  and  $code == 1000 ) {



( run in 1.277 second using v1.01-cache-2.11-cpan-99c4e6809bf )