File Coverage

blib/lib/Net/DRI/DRD/PL.pm
Criterion Covered Total %
statement 25 36 69.4
branch 1 2 50.0
condition n/a
subroutine 9 14 64.2
pod 4 9 44.4
total 39 61 63.9


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, .PL policies
2             ##
3             ## Copyright (c) 2006,2008-2013 Patrick Mevzek . All rights reserved.
4             ##
5             ## This file is part of Net::DRI
6             ##
7             ## Net::DRI is free software; you can redistribute it and/or modify
8             ## it under the terms of the GNU General Public License as published by
9             ## the Free Software Foundation; either version 2 of the License, or
10             ## (at your option) any later version.
11             ##
12             ## See the LICENSE file that comes with this distribution for more details.
13             ####################################################################################################
14              
15             package Net::DRI::DRD::PL;
16              
17 2     2   2109 use strict;
  2         5  
  2         93  
18 2     2   12 use warnings;
  2         3  
  2         74  
19              
20 2     2   8 use base qw/Net::DRI::DRD/;
  2         3  
  2         815  
21              
22 2     2   16 use Net::DRI::Exception;
  2         3  
  2         41  
23 2     2   9 use DateTime::Duration;
  2         3  
  2         817  
24              
25             __PACKAGE__->make_exception_for_unavailable_operations(qw/domain_transfer_accept domain_transfer_refuse contact_transfer_stop contact_transfer_query contact_transfer_accept contact_transfer_refuse/);
26              
27             =pod
28              
29             =head1 NAME
30              
31             Net::DRI::DRD::PL - .PL policies for Net::DRI
32              
33             =head1 DESCRIPTION
34              
35             Please see the README file for details.
36              
37             =head1 SUPPORT
38              
39             For now, support questions should be sent to:
40              
41             Enetdri@dotandco.comE
42              
43             Please also see the SUPPORT file in the distribution.
44              
45             =head1 SEE ALSO
46              
47             Ehttp://www.dotandco.com/services/software/Net-DRI/E
48              
49             =head1 AUTHOR
50              
51             Patrick Mevzek, Enetdri@dotandco.comE
52              
53             =head1 COPYRIGHT
54              
55             Copyright (c) 2006,2008-2013 Patrick Mevzek .
56             All rights reserved.
57              
58             This program is free software; you can redistribute it and/or modify
59             it under the terms of the GNU General Public License as published by
60             the Free Software Foundation; either version 2 of the License, or
61             (at your option) any later version.
62              
63             See the LICENSE file that comes with this distribution for more details.
64              
65             =cut
66              
67             ####################################################################################################
68              
69             sub new
70             {
71 1     1 0 2 my $class=shift;
72 1         6 my $self=$class->SUPER::new(@_);
73 1         8 $self->{info}->{host_as_attr}=0;
74 1         1 $self->{info}->{contact_i18n}=1; ## LOC only
75 1         2 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 2 sub name { return 'NASK'; }
80             ## See http://www.dns.pl/english/dns-funk.html
81 1     1 1 3 sub tlds { return ('pl',map { $_.'.pl'} qw/aid agro atm auto biz com edu gmina gsm info mail miasta media mil net nieruchomosci nom org pc powiat priv realestate rel sex shop sklep sos szkola targi tm tourism travel turystyka waw/ ); }
  34         34  
82 0     0 1 0 sub object_types { return ('domain','contact','ns'); }
83 0     0 0 0 sub profile_types { return qw/epp/; }
84              
85             sub transport_protocol_default
86             {
87 1     1 0 1 my ($self,$type)=@_;
88              
89 1 50       4 return ('Net::DRI::Transport::HTTP',{protocol_connection=>'Net::DRI::Protocol::EPP::Extensions::HTTP'},'Net::DRI::Protocol::EPP::Extensions::PL',{}) if $type eq 'epp'; ## EPP is over HTTPS here
90 0           return;
91             }
92              
93             ####################################################################################################
94              
95             sub message_retrieve
96             {
97 0     0 0   my ($self,$ndr,$id)=@_;
98 0           my $rc=$ndr->process('message','plretrieve',[$id]);
99 0           return $rc;
100             }
101              
102             sub report_create
103             {
104 0     0 0   my ($self,$ndr,$id,$rp)=@_;
105 0           my $rc=$ndr->process('report','create',[$id,$rp]);
106 0           return $rc;
107             }
108              
109             ####################################################################################################
110             1;