DRI/Protocol/EPP/Extensions/CentralNic/Release.pm

filter: Statementstmt 53.3% 16 / 30 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 15 MC/DCmcdc 0.0% 0 / 7 Subroutinesub 62.5% 5 / 8 Podpod 0.0% 0 / 3 totaltotal 30.4% 21 / 69 CC 9 SCAR 39.4
CC
9
Cov
31%
release
90.0
register_commands
2.0
release_parse
2.0
CRAP 51.2
« DRI/Protocol/EPP/Extensions/AERO/Domain.pm ↑ Summary DRI/DRD/ICANN.pm »
1 ## Domain Registry Interface, CentralNic Release EPP extension
2 ## (http://labs.centralnic.com/epp/ext/release.php)
3 ##
4 ## Copyright (c) 2007,2008,2013,2018 Patrick Mevzek <netdri@dotandco.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::Protocol::EPP::Extensions::CentralNic::Release;
17  
18 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 1 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use Net::DRI::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶use Net::DRI::Protocol::EPP::Core::Domain;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 =pod
26  
27 =head1 NAME
28  
29 Net::DRI::Protocol::EPP::Extensions::CentralNic::Release - EPP Release CentralNic extension commands 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 E<lt>netdri@dotandco.comE<gt>
40  
41 Please also see the SUPPORT file in the distribution.
42  
43 =head1 SEE ALSO
44  
45 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
46  
47 =head1 AUTHOR
48  
49 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
50  
51 =head1 COPYRIGHT
52  
53 Copyright (c) 2007,2008,2013,2018 Patrick Mevzek <netdri@dotandco.com>.
54 All rights reserved.
55  
56 This program is free software; you can redistribute it and/or modify
57 it under the terms of the GNU General Public License as published by
58 the Free Software Foundation; either version 2 of the License, or
59 (at your option) any later version.
60  
61 See the LICENSE file that comes with this distribution for more details.
62  
63 =cut
64  
65 ####################################################################################################
66  
67 sub register_commands
68 0 ▶{
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
69 0 my ($class,$version)=@_;
70 0 my %tmp=( release => [ \&release, \&release_parse ]);
71 0 return { 'domain' => \%tmp };
72 }
73  
74 ####################################################################################################
75  
76 sub release
77 0 ▶{
Subroutine release: not called CC=9 SCAR=45.0
Pod undocumented
78 0 my ($epp,$domain,$rd)=@_;
79 0 my $mes=$epp->message();
80  
81 0 ▶ Net::DRI::Exception->die(1,'protocol/EPP',2,'Domain name needed') unless defined($domain) && $domain;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $domain and $domain 0 0 0
Condition0%0/3
defined $domain and $domain
!ll&&!rl&&r
000
MC/DC0%0/2
defined $domain and $domain
defined $domain $domain
Truth table0%0/3
A and B
A= defined $domainB= $domain
ABresult
0X0
100
111
82 0 ▶ Net::DRI::Exception->die(1,'protocol/EPP',10,'Invalid domain name: '.$domain) unless Net::DRI::Util::is_hostname($domain);
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::is_hostname($domain) 0 0 0
83  
84 0 ▶ Net::DRI::Exception::usererr_invalid_parameters('release operation needs a clID') unless (defined($rd) && (ref($rd) eq 'HASH') && exists($rd->{clID}) && defined($rd->{clID}) && $rd->{clID});
Branch: 1 branch
BranchTrueFalseTotal
unless defined $rd and ref $rd eq "HASH" and exists $rd->{"clID"} and defined $rd->{"clID"} and $rd->{"clID"} 0 0 0
Condition0%0/12
defined $rd and ref $rd eq "HASH" and exists $rd->{"clID"} and defined $rd->{"clID"} and $rd->{"clID"}
!ll&&!rl&&r
000
defined $rd and ref $rd eq "HASH" and exists $rd->{"clID"} and defined $rd->{"clID"}
!ll&&!rl&&r
000
defined $rd and ref $rd eq "HASH" and exists $rd->{"clID"}
!ll&&!rl&&r
000
defined $rd and ref $rd eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/5
defined $rd and ref $rd eq "HASH" and exists $rd->{"clID"} and defined $rd->{"clID"} and $rd->{"clID"}
defined $rd ref $rd eq "HASH" exists $rd->{"clID"} defined $rd->{"clID"} $rd->{"clID"}
Truth table0%0/6
A and B and C and D and E
A= defined $rdB= ref $rd eq "HASH"C= exists $rd->{"clID"}D= defined $rd->{"clID"}E= $rd->{"clID"}
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
85  
86 0 $mes->command([['transfer',{'op'=>'release'}],'domain:transfer', $mes->nsattrs('domain')]);
87 0 my @d=(['domain:name',$domain],['domain:clID',$rd->{clID}]);
88 0 $mes->command_body(\@d);
89 0 return;
90 }
91  
92 sub release_parse
93 0 ▶{
Subroutine release_parse: not called CC=1 SCAR=6.9
Pod undocumented
94 0 my (@args)=@_;
95 0 return Net::DRI::Protocol::EPP::Core::Domain::transfer_parse(@args);
96 }
97  
98 ####################################################################################################
99 1 1;
« DRI/Protocol/EPP/Extensions/AERO/Domain.pm ↑ Summary DRI/DRD/ICANN.pm »