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

filter: Statementstmt 50.0% 13 / 26 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 44.7% 17 / 38 CC 2 SCAR 9.2
CC
2
Cov
46%
renew
6.0
register_commands
2.0
setup
2.0
CRAP 2.5
« DRI/DRD/OVH.pm ↑ Summary DRI/Logging/Stderr.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 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 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 {
69 0 ▶ my ($class, $version) = @_;
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
70 0 state $cmds = { 'domain' => { 'renew' => [ \&renew, undef ] } };
71  
72 0 return $cmds;
73 }
74  
75 sub setup
76 {
77 0 ▶ my ($class,$po,$version)=@_;
Subroutine setup: not called CC=1 SCAR=6.9
Pod undocumented
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 {
89 0 ▶ my ($epp, $domain, $rd) = @_;
Subroutine renew: not called CC=2 SCAR=17.9
Pod undocumented
90 0 my $mes = $epp->message();
91  
92 0 ▶ return unless Net::DRI::Util::has_key($rd,'rgp');
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "rgp") 0 0 0
93  
94 0 my $eid = $mes->command_extension_register('argp', 'renew');
95 0 $mes->command_extension($eid, ['argp:restore']);
96 0 return;
97 }
98  
99 ####################################################################################################
100 1 1;
« DRI/DRD/OVH.pm ↑ Summary DRI/Logging/Stderr.pm »