DRI/Protocol/EPP/Extensions/ARNES/Domain.pm

filter: Statementstmt 35.7% 10 / 28 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 23.6% 13 / 55 CC 9 SCAR 41.4
CC
9
Cov
23%
info_parse
90.0
register_commands
2.0
BEGIN
1.0
CRAP 62.7
« DRI/Transport.pm ↑ Summary DRI/Data/Contact/IT.pm »
1 ## Domain Registry Interface, .SI Domain EPP extension commands
2 ##
3 ## Copyright (c) 2007,2008,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::Protocol::EPP::Extensions::ARNES::Domain;
16  
17 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 1 ▶use feature 'state';
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 =pod
22  
23 =head1 NAME
24  
25 Net::DRI::Protocol::EPP::Extensions::ARNES::Domain - .SI EPP Domain extension commands for Net::DRI
26  
27 =head1 DESCRIPTION
28  
29 Please see the README file for details.
30  
31 =head1 SUPPORT
32  
33 For now, support questions should be sent to:
34  
35 E<lt>netdri@dotandco.comE<gt>
36  
37 Please also see the SUPPORT file in the distribution.
38  
39 =head1 SEE ALSO
40  
41 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
42  
43 =head1 AUTHOR
44  
45 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
46  
47 =head1 COPYRIGHT
48  
49 Copyright (c) 2007,2008,2016 Patrick Mevzek <netdri@dotandco.com>.
50 All rights reserved.
51  
52 This program is free software; you can redistribute it and/or modify
53 it under the terms of the GNU General Public License as published by
54 the Free Software Foundation; either version 2 of the License, or
55 (at your option) any later version.
56  
57 See the LICENSE file that comes with this distribution for more details.
58  
59 =cut
60  
61 ####################################################################################################
62  
63 sub register_commands
64 {
65 0 ▶ my ($class,$version)=@_;
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
66 0 state $rcmds = { 'domain' => { 'info' => [ undef, \&info_parse ] } };
67 0 return $rcmds;
68 }
69  
70 ####################################################################################################
71  
72 sub info_parse
73 {
74 0 ▶ my ($po,$otype,$oaction,$oname,$rinfo)=@_;
Subroutine info_parse: not called CC=9 SCAR=45.0
Pod undocumented
75 0 my $mes=$po->message();
76 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
77  
78 0 my $infdata=$mes->get_extension('dnssi','ext');
79 0 ▶ return unless $infdata;
Branch: 1 branch
BranchTrueFalseTotal
unless $infdata 0 0 0
80  
81 0 $infdata=$infdata->getChildrenByTagName('dnssi:infData');
82 0 ▶ return unless ($infdata && $infdata->size()==1);
Branch: 1 branch
BranchTrueFalseTotal
unless $infdata and $infdata->size == 1 0 0 0
Condition0%0/3
$infdata and $infdata->size == 1
!ll&&!rl&&r
000
MC/DC0%0/2
$infdata and $infdata->size == 1
$infdata $infdata->size == 1
Truth table0%0/3
A and B
A= $infdataB= $infdata->size == 1
ABresult
0X0
100
111
83 0 $infdata=$infdata->shift()->getChildrenByTagName('dnssi:domain');
84 0 ▶ return unless ($infdata && $infdata->size()==1);
Branch: 1 branch
BranchTrueFalseTotal
unless $infdata and $infdata->size == 1 0 0 0
Condition0%0/3
$infdata and $infdata->size == 1
!ll&&!rl&&r
000
MC/DC0%0/2
$infdata and $infdata->size == 1
$infdata $infdata->size == 1
Truth table0%0/3
A and B
A= $infdataB= $infdata->size == 1
ABresult
0X0
100
111
85 0 $infdata=$infdata->pop();
86  
87 0 my $cs=$rinfo->{domain}->{$oname}->{status};
88 0 foreach my $s (qw/pendingLegislativeReturn pendingLegislativeReturnQuarantine pendingQuarantine serverTransferRegistrantProhibited/)
89 {
90 0 ▶ if ( $infdata =~ /\"$s\"/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($infdata =~ /\"$s\"/) 0 0 0
91 0 $cs->add($s);
92 }
93 }
94  
95 0 return;
96 }
97  
98 ####################################################################################################
99 1 1;
« DRI/Transport.pm ↑ Summary DRI/Data/Contact/IT.pm »