DRI/DRD/Nominet.pm

filter: Statementstmt 58.0% 29 / 50 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 47.6% 10 / 21 Podpod 26.6% 4 / 15 totaltotal 50.0% 45 / 90 CC 3 SCAR 5.9
CC
3
Cov
57%
transport_protocol_default
3.5
periods
2.0
object_types
2.0
CRAP 1.8
« DRI/DRD/SIDN.pm ↑ Summary DRI/DRD/RegistryPro.pm »
1 ## Domain Registry Interface, .UK (Nominet) policies for Net::DRI
2 ##
3 ## Copyright (c) 2007-2011 Patrick Mevzek <netdri@dotandco.com>. All rights reserved.
4 ## (c) 2013,2016 Michael Holloway <michael@thedarkwinter.com>. 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::Nominet;
17  
18 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 2 ▶use base qw/Net::DRI::DRD/;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 2 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use Net::DRI::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 2 ▶use DateTime::Duration;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 2 __PACKAGE__->make_exception_for_unavailable_operations(qw/domain_update_status_add domain_update_status_del domain_update_status_set domain_update_status domain_status_allows_delete domain_status_allows_update domain_status_allows_transfer domain_status_allows_renew domain_status_allows domain_current_status host_update_status_add host_update_status_del host_update_status_set host_update_status host_current_status contact_update_status_add contact_update_status_del contact_update_status_set contact_update_status contact_current_status contact_transfer contact_transfer_start contact_transfer_stop contact_transfer_query domain_transfer_stop domain_transfer_query host_delete contact_delete/);
29  
30 =pod
31  
32 =head1 NAME
33  
34 Net::DRI::DRD::Nominet - .UK (Nominet) policies for Net::DRI
35  
36 =head1 DESCRIPTION
37  
38 Please see the README file for details.
39  
40 =head1 SUPPORT
41  
42 For now, support questions should be sent to:
43  
44 E<lt>netdri@dotandco.comE<gt>
45  
46 Please also see the SUPPORT file in the distribution.
47  
48 =head1 SEE ALSO
49  
50 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
51  
52 =head1 AUTHOR
53  
54 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
55  
56 =head1 COPYRIGHT
57  
58 Copyright (c) 2007-2011 Patrick Mevzek <netdri@dotandco.com>.
59 (c) 2013,2016 Michael Holloway <michael@thedarkwinter.com>.
60 All rights reserved.
61  
62 This program is free software; you can redistribute it and/or modify
63 it under the terms of the GNU General Public License as published by
64 the Free Software Foundation; either version 2 of the License, or
65 (at your option) any later version.
66  
67 See the LICENSE file that comes with this distribution for more details.
68  
69 =cut
70  
71 ####################################################################################################
72  
73 sub new
74 {
75 1 ▶ my $class=shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
76 1 my $self=$class->SUPER::new(@_);
77 1 $self->{info}->{contact_i18n}=1; ## LOC only
78 1 return $self;
79 }
80  
81 0 ▶sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
Subroutine periods: not called CC=1 SCAR=6.9
Pod documented
82 1 ▶sub name { return 'Nominet'; }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
83 1 ▶sub tlds { return qw/co.uk ltd.uk me.uk net.uk org.uk plc.uk sch.uk/; }
Subroutine tlds: called CC=1 SCAR=0.0
Pod documented
84 0 ▶sub object_types { return qw/domain contact ns/; }
Subroutine object_types: not called CC=1 SCAR=6.9
Pod documented
85 0 ▶sub profile_types { return qw/epp/; }
Subroutine profile_types: not called CC=1 SCAR=6.9
Pod undocumented
86  
87 sub transport_protocol_default
88 {
89 1 ▶ my ($self,$type)=@_;
Subroutine transport_protocol_default: called CC=3 SCAR=12.5
Pod undocumented
90 1 ▶ Net::DRI::Exception->die(0,'DRD',6,"Nominet EPP no longer supported, please use Standard EPP interface") if $type eq 'epp_nominet';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "epp_nominet" 0 1 1
91 1 ▶ return ('Net::DRI::Transport::Socket',{remote_host => 'epp.nominet.org.uk', ssl_version => 'TLSv12'},'Net::DRI::Protocol::EPP::Extensions::Nominet',{}) if $type eq 'epp';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "epp" 1 0 1
92 0 return;
93 }
94  
95 ####################################################################################################
96  
97 sub domain_unrenew
98 {
99 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_unrenew: not called CC=1 SCAR=6.9
Pod undocumented
100 0 return $ndr->process('domain','unrenew',[$domain,$rd]);
101 }
102  
103 sub domain_list
104 {
105 0 ▶ my ($self,$ndr,$rd)=@_;
Subroutine domain_list: not called CC=1 SCAR=6.9
Pod undocumented
106 0 return $ndr->process('domain','list',[$rd]);
107 }
108  
109 sub domain_lock
110 {
111 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_lock: not called CC=1 SCAR=6.9
Pod undocumented
112 0 return $ndr->process('domain','lock',[$domain,$rd]);
113 }
114  
115 sub domain_transfer_start # release
116 {
117 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_transfer_start: not called CC=1 SCAR=6.9
Pod undocumented
118 0 return $ndr->process('domain','transfer_start',[$domain,$rd]);
119 }
120  
121 sub domain_transfer_accept # handshake
122 {
123 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_transfer_accept: not called CC=1 SCAR=6.9
Pod undocumented
124 0 return $ndr->process('domain','transfer_accept',[$domain,$rd]);
125 }
126  
127 sub domain_transfer_refuse # handshake
128 {
129 0 ▶ my ($self,$ndr,$domain,$rd)=@_;
Subroutine domain_transfer_refuse: not called CC=1 SCAR=6.9
Pod undocumented
130 0 return $ndr->process('domain','transfer_refuse',[$domain,$rd]);
131 }
132  
133 sub contact_fork
134 {
135 0 ▶ my ($self,$ndr,$contact,$rd)=@_;
Subroutine contact_fork: not called CC=1 SCAR=6.9
Pod undocumented
136 0 return $ndr->process('contact','fork',[$contact,$rd]);
137 }
138  
139 sub contact_lock
140 {
141 0 ▶ my ($self,$ndr,$contact,$rd)=@_;
Subroutine contact_lock: not called CC=1 SCAR=6.9
Pod undocumented
142 0 return $ndr->process('contact','lock',[$contact,$rd]);
143 }
144  
145 ####################################################################################################
146 2 1;
« DRI/DRD/SIDN.pm ↑ Summary DRI/DRD/RegistryPro.pm »