File Coverage

blib/lib/Net/DRI/DRD/RegistryPro.pm
Criterion Covered Total %
statement 20 33 60.6
branch 1 2 50.0
condition n/a
subroutine 8 15 53.3
pod 4 11 36.3
total 33 61 54.1


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, RegistryPro (.PRO) policies
2             ##
3             ## Copyright (c) 2008,2009 Tonnerre Lombard . All rights reserved.
4             ## (c) 2011,2016 Patrick Mevzek . All rights reserved.
5             ##
6             ## This file is part of Net::DRI
7             ##
8             ## Net::DRI is free software; you can redistribute it and/or modify
9             ## it under the terms of the GNU General Public License as published by
10             ## the Free Software Foundation; either version 2 of the License, or
11             ## (at your option) any later version.
12             ##
13             ## See the LICENSE file that comes with this distribution for more details.
14             ####################################################################################################
15              
16             package Net::DRI::DRD::RegistryPro;
17              
18 2     2   1048 use strict;
  2         2  
  2         44  
19 2     2   5 use warnings;
  2         2  
  2         44  
20              
21 2     2   7 use base qw/Net::DRI::DRD/;
  2         2  
  2         562  
22              
23 2     2   17 use DateTime::Duration;
  2         2  
  2         496  
24              
25             =pod
26              
27             =head1 NAME
28              
29             Net::DRI::DRD::RegistryPro - RegistryPro (.PRO) policies for Net::DRI
30              
31             =head1 DESCRIPTION
32              
33             Please see the README file for details.
34              
35             =head1 SUPPORT
36              
37             For now, support questions should be sent to:
38              
39             Edevelopment@sygroup.chE
40              
41             Please also see the SUPPORT file in the distribution.
42              
43             =head1 SEE ALSO
44              
45             Ehttp://www.dotandco.com/services/software/Net-DRI/E
46              
47             =head1 AUTHOR
48              
49             Tonnerre Lombard, Etonnerre.lombard@sygroup.chE,
50             Alexander Biehl, Einfo@hexonet.netE, HEXONET Support GmbH,
51             Ehttp://www.hexonet.net/E.
52              
53             =head1 COPYRIGHT
54              
55             Copyright (c) 2008,2009 Tonnerre Lombard .
56             (c) 2011,2016 Patrick Mevzek . All rights reserved.
57             All rights reserved.
58              
59             This program is free software; you can redistribute it and/or modify
60             it under the terms of the GNU General Public License as published by
61             the Free Software Foundation; either version 2 of the License, or
62             (at your option) any later version.
63              
64             See the LICENSE file that comes with this distribution for more details.
65              
66             =cut
67              
68             ####################################################################################################
69              
70             sub new
71             {
72 1     1 0 1 my $class = shift;
73 1         5 my $self = $class->SUPER::new(@_);
74 1         4 $self->{info}->{host_as_attr} = 0;
75 1         1 return $self;
76             }
77              
78 0     0 1 0 sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
  0         0  
79 1     1 1 3 sub name { return 'RegistryPro'; }
80 1     1 1 4 sub tlds { return qw/pro law.pro jur.pro bar.pro med.pro cpa.pro aca.pro eng.pro/; }
81 0     0 1 0 sub object_types { return ('domain','contact','ns','av'); }
82 0     0 0 0 sub profile_types { return qw/epp/; }
83              
84             sub transport_protocol_default
85             {
86 1     1 0 1 my ($self,$type)=@_;
87              
88 1 50       4 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::PRO',{}) if $type eq 'epp';
89 0           return;
90             }
91              
92             ####################################################################################################
93              
94             sub verify_name_domain
95             {
96 0     0 0   my ($self, $ndr, $domain, $op) = @_;
97 0           return $self->_verify_name_rules($domain,$op,{check_name => 1,
98             my_tld => 1,
99             icann_reserved => 1,
100             });
101             }
102              
103             ####################################################################################################
104             ## TODO : $av should be checked here to be syntaxically correct before doing process()
105              
106 0     0 0   sub av_create { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','create',[$av,$ep]); }
  0            
107 0     0 0   sub av_check { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','check',[$av,$ep]); }
  0            
108 0     0 0   sub av_info { my ($self,$ndr,$av,$ep)=@_; return $ndr->process('av','info',[$av,$ep]); }
  0            
109              
110             ####################################################################################################
111             1;