DRI/Protocol/EPP/Extensions/Afilias/Restore.pm

filter: Statementstmt 54.1% 13 / 24 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 41.4% 17 / 41 CC 3 SCAR 15.9
CC
3
Cov
45%
renew
12.0
register_commands
2.0
setup
2.0
CRAP 4.9
« DRI/Data/Changes.pm ↑ Summary DRI/Protocol/Whois/Domain/AERO.pm »
1 ## Domain Registry Interface, Afilias EPP Renew Redemption Period Extension
2 ##
3 ## Copyright (c) 2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. All rights reserved.
4 ## Copyright (c) 2016,2018,2019 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::Afilias::Restore;
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 1 ▶use feature 'state';
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 1 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
23  
24 =pod
25  
26 =head1 NAME
27  
28 Net::DRI::Protocol::EPP::Extensions::Afilias::Restore - EPP renew redemption period support for Net::DRI
29  
30 =head1 DESCRIPTION
31  
32 Please see the README file for details.
33  
34 =head1 SUPPORT
35  
36 For now, support questions should be sent to:
37  
38 E<lt>tonnerre.lombard@sygroup.chE<gt>
39  
40 Please also see the SUPPORT file in the distribution.
41  
42 =head1 SEE ALSO
43  
44 E<lt>http://oss.bsdprojects.net/projects/netdri/E<gt>
45  
46 =head1 AUTHOR
47  
48 Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt>
49  
50 =head1 COPYRIGHT
51  
52 Copyright (c) 2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>.
53 Copyright (c) 2016,2018,2019 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 state $cmds = { 'domain' => { 'renew' => [ \&renew, undef ] } };
71  
72 0 return $cmds;
73 }
74  
75 sub setup
76 0 ▶{
Subroutine setup: not called CC=1 SCAR=6.9
Pod undocumented
77 0 my ($class,$po,$version)=@_;
78 0 state $rns = { 'argp' => 'urn:EPP:xml:ns:ext:rgp-1.0' };
79 0 $po->ns($rns);
80 0 return;
81 }
82  
83 ####################################################################################################
84  
85 ############ Transform commands
86  
87 sub renew
88 0 ▶{
Subroutine renew: not called CC=3 SCAR=24.8
Pod undocumented
89 0 my ($epp, $domain, $rd) = @_;
90  
91 0 ▶ return unless Net::DRI::Util::has_key($rd, 'rgp') && $rd->{'rgp'};
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "rgp") and $rd->{"rgp"} 0 0 0
Condition0%0/3
Net::DRI::Util::has_key($rd, "rgp") and $rd->{"rgp"}
!ll&&!rl&&r
000
MC/DC0%0/2
Net::DRI::Util::has_key($rd, "rgp") and $rd->{"rgp"}
Net::DRI::Util::has_key($rd, "rgp") $rd->{"rgp"}
Truth table0%0/3
A and B
A= Net::DRI::Util::has_key($rd, "rgp")B= $rd->{"rgp"}
ABresult
0X0
100
111
92  
93 0 $epp->message()->command_extension('argp', ['renew', ['restore']]);
94 0 return;
95 }
96  
97 ####################################################################################################
98 1 1;
« DRI/Data/Changes.pm ↑ Summary DRI/Protocol/Whois/Domain/AERO.pm »