DRI/DRD/DNSPT.pm

filter: Statementstmt 69.0% 29 / 42 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 62.5% 10 / 16 Podpod 44.4% 4 / 9 totaltotal 61.9% 44 / 71 CC 3 SCAR 7.1
CC
3
Cov
65%
transport_protocol_default
5.2
periods
2.0
object_types
2.0
CRAP 2.0
« DRI/DRD/SITA.pm ↑ Summary DRI/Protocol/EPP/Extensions/Nominet/Session.pm »
1 ## Domain Registry Interface, DNSPT (.PT) Registry Driver for Net::DRI
2 ##
3 ## Copyright (c) 2008-2011,2013,2016 Patrick Mevzek <netdri@dotandco.com>. 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::DNSPT;
16  
17 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 2 ▶use base qw/Net::DRI::DRD/;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 2 ▶use DateTime::Duration;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 2 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use Net::DRI::Data::Contact::FCCN;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 2 __PACKAGE__->make_exception_for_unavailable_operations(qw/contact_check contact_delete contact_transfer contact_transfer_start contact_transfer_stop contact_transfer_query contact_transfer_accept contact_transfer_refuse message_retrieve message_delete message_waiting message_count/);
27  
28 =pod
29  
30 =head1 NAME
31  
32 Net::DRI::DRD::DNSPT - DNSPT (.PT) Registry driver for Net::DRI
33  
34 =head1 DESCRIPTION
35  
36 Please see the README file for details.
37  
38 =head1 SUPPORT
39  
40 For now, support questions should be sent to:
41  
42 E<lt>netdri@dotandco.comE<gt>
43  
44 Please also see the SUPPORT file in the distribution.
45  
46 =head1 SEE ALSO
47  
48 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
49  
50 =head1 AUTHOR
51  
52 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
53  
54 =head1 COPYRIGHT
55  
56 Copyright (c) 2008-2011,2013,2016 Patrick Mevzek <netdri@dotandco.com>.
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 ▶ my $class=shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
73 1 my $self=$class->SUPER::new(@_);
74 1 $self->{info}->{host_as_attr}=1;
75 1 $self->{info}->{contact_i18n}=1; ## LOC only
76 1 return $self;
77 }
78  
79 0 ▶sub periods { return map { DateTime::Duration->new(years => $_) } (1,3,5); }
Subroutine periods: not called CC=1 SCAR=6.9
Pod documented
80 1 ▶sub name { return 'DNSPT'; }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
81 1 ▶sub tlds { return qw/pt net.pt org.pt edu.pt int.pt publ.pt com.pt nome.pt/; }
Subroutine tlds: called CC=1 SCAR=0.0
Pod documented
82 0 ▶sub object_types { return ('domain','contact'); }
Subroutine object_types: not called CC=1 SCAR=6.9
Pod documented
83 0 ▶sub profile_types { return qw/epp whois/; }
Subroutine profile_types: not called CC=1 SCAR=6.9
Pod undocumented
84  
85 sub transport_protocol_default
86 {
87 1 ▶ my ($self,$type)=@_;
Subroutine transport_protocol_default: called CC=3 SCAR=16.5
Pod undocumented
88  
89 1 ▶ return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::FCCN',{}) if $type eq 'epp';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "epp" 1 0 1
90 0 ▶ return ('Net::DRI::Transport::Socket',{remote_host=>'whois.nic.pt'},'Net::DRI::Protocol::Whois',{}) if $type eq 'whois';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "whois" 0 0 0
91 0 return;
92 }
93  
94 sub set_factories
95 {
96 0 ▶ my ($self,$po)=@_;
Subroutine set_factories: not called CC=1 SCAR=6.9
Pod undocumented
97 0 ▶ $po->factories('contact',sub { return Net::DRI::Data::Contact::FCCN->new(@_); });
Subroutine __ANON__: not called CC=1 SCAR=6.9
98 0 return;
99 }
100  
101 ####################################################################################################
102  
103 sub domain_renounce
104 {
105 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_renounce: not called CC=1 SCAR=6.9
Pod undocumented
106 0 $self->enforce_domain_name_constraints($ndr,$domain,'renounce');
107  
108 0 return $ndr->process('domain','renounce',[$domain,$rd]);
109 }
110  
111 ####################################################################################################
112 2 1;
« DRI/DRD/SITA.pm ↑ Summary DRI/Protocol/EPP/Extensions/Nominet/Session.pm »