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

filter: Statementstmt 7.8% 13 / 166 Branchbran 0.0% 0 / 118 Conditioncond 0.0% 0 / 32 MC/DCmcdc 0.0% 0 / 20 Subroutinesub 22.2% 4 / 18 Podpod 0.0% 0 / 14 totaltotal 4.6% 17 / 368 CC 74 SCAR 49.9
CC
74
Cov
4%
parse_extra_data
380.0
check_parse
182.0
update
156.0
CRAP 146.2
« DRI/Protocol/RRI/Domain.pm ↑ Summary DRI/Protocol/EPP/Extensions/CZ/NSSET.pm »
1 ## Domain Registry Interface, .BR Domain EPP extension commands
2 ## draft-neves-epp-brdomain-03.txt
3 ##
4 ## Copyright (c) 2008,2013,2016,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::BR::Domain;
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::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
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::BR::Domain - .BR EPP Domain extension commands 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>netdri@dotandco.comE<gt>
39  
40 Please also see the SUPPORT file in the distribution.
41  
42 =head1 SEE ALSO
43  
44 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
45  
46 =head1 AUTHOR
47  
48 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
49  
50 =head1 COPYRIGHT
51  
52 Copyright (c) 2008,2013,2016,2019 Patrick Mevzek <netdri@dotandco.com>.
53 All rights reserved.
54  
55 This program is free software; you can redistribute it and/or modify
56 it under the terms of the GNU General Public License as published by
57 the Free Software Foundation; either version 2 of the License, or
58 (at your option) any later version.
59  
60 See the LICENSE file that comes with this distribution for more details.
61  
62 =cut
63  
64 ####################################################################################################
65  
66 sub register_commands
67 0 ▶{
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my ($class,$version)=@_;
69 0 my %tmp=(
70 check => [ \&check, \&check_parse ],
71 info => [ \&info, \&info_parse ],
72 create => [ \&create, \&create_parse ],
73 renew => [ undef, \&renew_parse ],
74 update => [ \&update, \&update_parse ],
75 review_complete => [ undef, \&pandata_parse ], ## needs to have same name for key as in Core/Domain to make sure this will be called after Core parsing !
76 );
77  
78 0 $tmp{check_multi}=$tmp{check};
79 0 return { 'domain' => \%tmp };
80 }
81  
82 ####################################################################################################
83  
84 sub check
85 0 ▶{
Subroutine check: not called CC=3 SCAR=24.8
Pod undocumented
86 0 my ($epp,$domain,$rd)=@_;
87  
88 0 ▶ return unless Net::DRI::Util::has_key($rd,'orgid');
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "orgid") 0 0 0
89 0 ▶ Net::DRI::Exception::usererr_invalid_parameters('orgid must be an xml token string with 1 to 30 characters') unless Net::DRI::Util::xml_is_token($rd->{orgid},1,30);
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::xml_is_token($rd->{"orgid"}, 1, 30) 0 0 0
90  
91 0 $epp->message()->command_extension('brdomain', ['check', ['organization', $rd->{orgid}]]);
92 0 return;
93 }
94  
95 sub check_parse
96 0 ▶{
Subroutine check_parse: not called CC=13 SCAR=52.0
Pod undocumented
97 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
98 0 my $mes=$po->message();
99 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
100  
101 0 my $chkdata=$mes->get_extension('brdomain','chkData');
102 0 ▶ return unless $chkdata;
Branch: 1 branch
BranchTrueFalseTotal
unless $chkdata 0 0 0
103  
104 0 foreach my $cd ($chkdata->getChildrenByTagNameNS($mes->ns('brdomain'),'cd'))
105 {
106 0 my $hc=$cd->getAttribute('hasConcurrent');
107 0 my $irp=$cd->getAttribute('inReleaseProcess');
108 0 my $c=$cd->getFirstChild();
109 0 my $domain;
110 my @tn;
111 0 ▶ while($c)
Branch: 1 branch
BranchTrueFalseTotal
if ($c) 0 0 0
112 {
113 0 ▶ next unless ($c->nodeType() == 1); ## only for element nodes
Branch: 1 branch
BranchTrueFalseTotal
unless $c->nodeType == 1 0 0 0
114 0 ▶ my $n=$c->localname() || $c->nodeName();
Condition0%0/3
$c->localname || $c->nodeName
l!l&&r!l&&!r
000
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname $c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
ABresult
1X1
011
000
115 0 ▶ if ($n eq 'name')
Branch: 4 branches
BranchTrueFalseTotal
if ($n eq 'name') { } 0 0 0
elsif ($n eq 'equivalentName') { } 0 0 0
elsif ($n eq 'organization') { } 0 0 0
elsif ($n eq 'ticketNumber') { } 0 0 0
116 {
117 0 $domain=lc($c->getFirstChild()->getData());
118 0 ▶ $rinfo->{domain}->{$domain}->{has_concurrent}=Net::DRI::Util::xml_parse_boolean($hc) if defined($hc);
Branch: 1 branch
BranchTrueFalseTotal
if defined $hc 0 0 0
119 0 ▶ $rinfo->{domain}->{$domain}->{in_release_process}=Net::DRI::Util::xml_parse_boolean($irp) if defined($irp);
Branch: 1 branch
BranchTrueFalseTotal
if defined $irp 0 0 0
120 } elsif ($n eq 'equivalentName')
121 {
122 0 $rinfo->{domain}->{$domain}->{equivalent_name}=$c->getFirstChild()->getData();
123 } elsif ($n eq 'organization')
124 {
125 0 $rinfo->{domain}->{$domain}->{orgid}=$c->getFirstChild()->getData();
126 } elsif ($n eq 'ticketNumber')
127 {
128 0 push @tn,$c->getFirstChild()->getData();
129 }
130 0 } continue { $c=$c->getNextSibling(); }
131 0 $rinfo->{domain}->{$domain}->{ticket}=\@tn;
132 }
133 0 return;
134 }
135  
136 sub info
137 0 ▶{
Subroutine info: not called CC=3 SCAR=24.8
Pod undocumented
138 0 my ($epp,$domain,$rd)=@_;
139  
140 0 ▶ return unless Net::DRI::Util::has_key($rd,'ticket');
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "ticket") 0 0 0
141 0 ▶ Net::DRI::Exception::usererr_invalid_parameters('ticket parameter must be an integer') unless Net::DRI::Util::isint($rd->{ticket});
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::isint($rd->{"ticket"}) 0 0 0
142  
143 0 $epp->message()->command_extension('brdomain', ['info', ['ticketNumber', $rd->{ticket}]]);
144 0 return;
145 }
146  
147 sub info_parse
148 0 ▶{
Subroutine info_parse: not called CC=3 SCAR=24.8
Pod undocumented
149 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
150 0 my $mes=$po->message();
151 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
152  
153 0 my $infdata=$mes->get_extension('brdomain','infData');
154 0 ▶ return unless $infdata;
Branch: 1 branch
BranchTrueFalseTotal
unless $infdata 0 0 0
155 0 parse_extra_data($po,$oname,$rinfo,$mes,$infdata);
156 0 return;
157 }
158  
159 sub parse_extra_data
160 0 ▶{
Subroutine parse_extra_data: not called CC=19 SCAR=59.4
Pod undocumented
161 0 my ($po,$oname,$rinfo,$mes,$c)=@_;
162 0 my $ns=$mes->ns('brdomain');
163 0 $c=$c->getFirstChild();
164 0 my @tnc;
165 0 ▶ while($c)
Branch: 1 branch
BranchTrueFalseTotal
if ($c) 0 0 0
166 {
167 0 ▶ next unless ($c->nodeType() == 1); ## only for element nodes
Branch: 1 branch
BranchTrueFalseTotal
unless $c->nodeType == 1 0 0 0
168 0 ▶ my $n=$c->localname() || $c->nodeName();
Condition0%0/3
$c->localname || $c->nodeName
l!l&&r!l&&!r
000
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname $c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
ABresult
1X1
011
000
169 0 ▶ if ($n eq 'ticketNumber')
Branch: 7 branches
BranchTrueFalseTotal
if ($n eq 'ticketNumber') { } 0 0 0
elsif ($n eq 'organization') { } 0 0 0
elsif ($n eq 'releaseProcessFlags') { } 0 0 0
elsif ($n eq 'pending') { } 0 0 0
elsif ($n eq 'ticketNumberConc') { } 0 0 0
elsif ($n eq 'publicationStatus') { } 0 0 0
elsif ($n eq 'autoRenew') { } 0 0 0
170 {
171 0 $rinfo->{domain}->{$oname}->{ticket}=$c->getFirstChild()->getData();
172 } elsif ($n eq 'organization')
173 {
174 0 $rinfo->{domain}->{$oname}->{orgid}=$c->getFirstChild()->getData();
175 } elsif ($n eq 'releaseProcessFlags')
176 {
177 0 my %f;
178 0 foreach my $f (1..3)
179 {
180 0 ▶ next unless $c->hasAttribute('flag'.$f);
Branch: 1 branch
BranchTrueFalseTotal
unless $c->hasAttribute('flag' . $f) 0 0 0
181 0 $f{'flag'.$f}=Net::DRI::Util::xml_parse_boolean($c->getAttribute('flag'.$f));
182 }
183 0 $rinfo->{domain}->{$oname}->{release_process}=\%f;
184 } elsif ($n eq 'pending')
185 {
186 0 my $cc=$c->getFirstChild();
187 0 my %p;
188 0 my $pd=DateTime::Format::ISO8601->new();
189 0 ▶ while($cc)
Branch: 1 branch
BranchTrueFalseTotal
if ($cc) 0 0 0
190 {
191 0 ▶ next unless ($cc->nodeType() == 1);
Branch: 1 branch
BranchTrueFalseTotal
unless $cc->nodeType == 1 0 0 0
192 0 ▶ my $nn=$cc->localName() || $c->nodeName();
Condition0%0/3
$cc->localName || $c->nodeName
l!l&&r!l&&!r
000
MC/DC0%0/2
$cc->localName || $c->nodeName
$cc->localName $c->nodeName
Truth table0%0/3
A || B
A= $cc->localNameB= $c->nodeName
ABresult
1X1
011
000
193 0 ▶ if ($nn eq 'doc')
Branch: 3 branches
BranchTrueFalseTotal
if ($nn eq 'doc') { } 0 0 0
elsif ($nn eq 'dns') { } 0 0 0
elsif ($nn eq 'releaseProc') { } 0 0 0
194 {
195 0 my $d=$cc->getChildrenByTagNameNS($ns,'description')->shift();
196 0 push @{$p{doc}}, { status => $cc->getAttribute('status'),
197 type => $cc->getChildrenByTagNameNS($ns,'docType')->shift()->getFirstChild()->getData(),
198 limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()),
199 description => $d->getFirstChild()->getData(),
200 lang => $d->getAttribute('lang'),
201 };
202 } elsif ($nn eq 'dns')
203 {
204 0 push @{$p{dns}},{ status => $cc->getAttribute('status'),
205 hostname => $cc->getChildrenByTagNameNS($ns,'hostName')->shift()->getFirstChild()->getData(),
206 limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()),
207 };
208 } elsif ($nn eq 'releaseProc')
209 {
210 0 $p{release}={ status => $cc->getAttribute('status'),
211 limit => $pd->parse_datetime($cc->getChildrenByTagNameNS($ns,'limit')->shift()->getFirstChild()->getData()),
212 };
213 }
214 0 } continue { $cc=$cc->getNextSibling(); }
215 0 $rinfo->{domain}->{$oname}->{pending}=\%p;
216 } elsif ($n eq 'ticketNumberConc')
217 {
218 0 push @tnc,$c->getFirstChild()->getData();
219 } elsif ($n eq 'publicationStatus')
220 {
221 0 $rinfo->{domain}->{$oname}->{publication}=parse_publication($ns,$c);
222 } elsif ($n eq 'autoRenew')
223 {
224 0 $rinfo->{domain}->{$oname}->{auto_renew}=Net::DRI::Util::xml_parse_boolean($c->getAttribute('active'));
225 }
226 0 } continue { $c=$c->getNextSibling(); }
227  
228 0 $rinfo->{domain}->{$oname}->{ticket_concurrent}=\@tnc;
229 0 return;
230 }
231  
232 sub parse_publication
233 0 ▶{
Subroutine parse_publication: not called CC=2 SCAR=17.9
Pod undocumented
234 0 my ($ns,$c)=@_;
235 0 my %s;
236 0 $s{flag}=$c->getAttribute('publicationFlag');
237 0 foreach my $r ($c->getChildrenByTagNameNS($ns,'onHoldReason'))
238 {
239 0 push @{$s{onhold_reason}},$r->getFirstChild()->getData();
240 }
241 0 return \%s;
242 }
243  
244 sub build_release
245 0 ▶{
Subroutine build_release: not called CC=4 SCAR=30.0
Pod undocumented
246 0 my $rh=shift;
247 0 ▶ my %f=map { $_ => (defined($rh->{$_}) && $rh->{$_})? 1 : 0 } grep { exists($rh->{$_}) } qw/flag1 flag2 flag3/;
Branch: 1 branch
BranchTrueFalseTotal
defined $rh->{$_} && $rh->{$_} ? : 0 0 0
Condition0%0/3
defined $rh->{$_} and $rh->{$_}
!ll&&!rl&&r
000
MC/DC0%0/2
defined $rh->{$_} and $rh->{$_}
defined $rh->{$_} $rh->{$_}
Truth table0%0/3
A and B
A= defined $rh->{$_}B= $rh->{$_}
ABresult
0X0
100
111
248 0 ▶ return keys(%f)? ['releaseProcessFlags',\%f] : ();
Branch: 1 branch
BranchTrueFalseTotal
keys %f ? : 0 0 0
249 }
250  
251 sub create
252 0 ▶{
Subroutine create: not called CC=7 SCAR=40.3
Pod undocumented
253 0 my ($epp,$domain,$rd)=@_;
254  
255 0 ▶ Net::DRI::Exception::usererr_insufficient_parameters('orgid is mandatory for domain_create') unless Net::DRI::Util::has_key($rd,'orgid');
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "orgid") 0 0 0
256 0 ▶ Net::DRI::Exception::usererr_invalid_parameters('orgid must be an xml token string with 1 to 30 characters') unless Net::DRI::Util::xml_is_token($rd->{orgid},1,30);
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::xml_is_token($rd->{"orgid"}, 1, 30) 0 0 0
257  
258 0 my @n=(['organization',$rd->{orgid}]);
259 0 ▶ push @n,build_release($rd->{release}) if (Net::DRI::Util::has_key($rd,'release') && (ref($rd->{release}) eq 'HASH'));
Branch: 1 branch
BranchTrueFalseTotal
if Net::DRI::Util::has_key($rd, "release") and ref $rd->{"release"} eq "HASH" 0 0 0
Condition0%0/3
Net::DRI::Util::has_key($rd, "release") and ref $rd->{"release"} eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
Net::DRI::Util::has_key($rd, "release") and ref $rd->{"release"} eq "HASH"
Net::DRI::Util::has_key($rd, "release") ref $rd->{"release"} eq "HASH"
Truth table0%0/3
A and B
A= Net::DRI::Util::has_key($rd, "release")B= ref $rd->{"release"} eq "HASH"
ABresult
0X0
100
111
260 0 ▶ push @n,['autoRenew',{active => $rd->{auto_renew}? 1 : 0 }] if (Net::DRI::Util::has_key($rd,'auto_renew'));
Branch: 2 branches
BranchTrueFalseTotal
if Net::DRI::Util::has_key($rd, "auto_renew") 0 0 0
$rd->{'auto_renew'} ? : 0 0 0
261  
262 0 $epp->message()->command_extension('brdomain', ['create', @n]);
263 0 return;
264 }
265  
266 sub create_parse
267 0 ▶{
Subroutine create_parse: not called CC=3 SCAR=24.8
Pod undocumented
268 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
269 0 my $mes=$po->message();
270 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
271  
272 0 my $credata=$mes->get_extension('brdomain','creData');
273 0 ▶ return unless $credata;
Branch: 1 branch
BranchTrueFalseTotal
unless $credata 0 0 0
274 0 parse_extra_data($po,$oname,$rinfo,$mes,$credata);
275 0 return;
276 }
277  
278 sub renew_parse
279 0 ▶{
Subroutine renew_parse: not called CC=4 SCAR=30.0
Pod undocumented
280 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
281 0 my $mes=$po->message();
282 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
283  
284 0 my $rendata=$mes->get_extension('brdomain','renData');
285 0 ▶ return unless $rendata;
Branch: 1 branch
BranchTrueFalseTotal
unless $rendata 0 0 0
286 0 my $ns=$mes->ns('brdomain');
287 0 my $pub=$rendata->getChildrenByTagNameNS($ns,'publicationStatus');
288 0 ▶ return unless $pub->size();
Branch: 1 branch
BranchTrueFalseTotal
unless $pub->size 0 0 0
289  
290 0 $rinfo->{domain}->{$oname}->{publication}=parse_publication($ns,$pub->shift());
291 0 return;
292 }
293  
294 sub update
295 0 ▶{
Subroutine update: not called CC=12 SCAR=50.5
Pod undocumented
296 0 my ($epp,$domain,$todo)=@_;
297  
298 0 my $ticket=$todo->set('ticket');
299 0 my $release=$todo->set('release');
300 0 my $autorenew=$todo->set('auto_renew');
301  
302 0 ▶ return unless (defined($ticket) || defined($release) || defined($autorenew));
Branch: 1 branch
BranchTrueFalseTotal
unless defined $ticket or defined $release or defined $autorenew 0 0 0
Condition0%0/6
defined $ticket or defined $release or defined $autorenew
l!l&&r!l&&!r
000
defined $ticket or defined $release
l!l&&r!l&&!r
000
MC/DC0%0/3
defined $ticket or defined $release or defined $autorenew
defined $ticket defined $release defined $autorenew
Truth table0%0/4
A or B or C
A= defined $ticketB= defined $releaseC= defined $autorenew
ABCresult
1XX1
01X1
0011
0000
303  
304 0 my @n;
305 0 ▶ push @n,['ticketNumber',$ticket] if (defined($ticket) && Net::DRI::Util::isint($ticket));
Branch: 1 branch
BranchTrueFalseTotal
if defined $ticket and Net::DRI::Util::isint($ticket) 0 0 0
Condition0%0/3
defined $ticket and Net::DRI::Util::isint($ticket)
!ll&&!rl&&r
000
MC/DC0%0/2
defined $ticket and Net::DRI::Util::isint($ticket)
defined $ticket Net::DRI::Util::isint($ticket)
Truth table0%0/3
A and B
A= defined $ticketB= Net::DRI::Util::isint($ticket)
ABresult
0X0
100
111
306 0 my @c;
307 0 ▶ push @c,build_release($release) if (defined($release) && (ref($release) eq 'HASH'));
Branch: 1 branch
BranchTrueFalseTotal
if defined $release and ref $release eq "HASH" 0 0 0
Condition0%0/3
defined $release and ref $release eq "HASH"
!ll&&!rl&&r
000
MC/DC0%0/2
defined $release and ref $release eq "HASH"
defined $release ref $release eq "HASH"
Truth table0%0/3
A and B
A= defined $releaseB= ref $release eq "HASH"
ABresult
0X0
100
111
308 0 ▶ push @c,['autoRenew',{active => $autorenew? 1 : 0}] if defined($autorenew);
Branch: 2 branches
BranchTrueFalseTotal
if defined $autorenew 0 0 0
$autorenew ? : 0 0 0
309 0 ▶ push @n,['chg',@c] if @c;
Branch: 1 branch
BranchTrueFalseTotal
if @c 0 0 0
310  
311 0 ▶ $epp->message()->command_extension('brdomain', ['update', @n]) if @n;
Branch: 1 branch
BranchTrueFalseTotal
if @n 0 0 0
312 0 return;
313 }
314  
315 sub update_parse
316 0 ▶{
Subroutine update_parse: not called CC=3 SCAR=24.8
Pod undocumented
317 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
318 0 my $mes=$po->message();
319 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
320  
321 0 my $upddata=$mes->get_extension('brdomain','updData');
322 0 ▶ return unless $upddata;
Branch: 1 branch
BranchTrueFalseTotal
unless $upddata 0 0 0
323 0 parse_extra_data($po,$oname,$rinfo,$mes,$upddata);
324 0 return;
325 }
326  
327 sub pandata_parse
328 0 ▶{
Subroutine pandata_parse: not called CC=10 SCAR=47.0
Pod undocumented
329 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
330 0 my $mes=$po->message();
331 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
332  
333 0 my $pandata=$mes->get_extension('brdomain','panData');
334 0 ▶ return unless $pandata;
Branch: 1 branch
BranchTrueFalseTotal
unless $pandata 0 0 0
335  
336 0 my $c=$pandata->firstChild();
337 0 ▶ while ($c)
Branch: 1 branch
BranchTrueFalseTotal
if ($c) 0 0 0
338 {
339 0 ▶ next unless ($c->nodeType() == 1); ## only for element nodes
Branch: 1 branch
BranchTrueFalseTotal
unless $c->nodeType == 1 0 0 0
340 0 ▶ my $n=$c->localname() || $c->nodeName();
Condition0%0/3
$c->localname || $c->nodeName
l!l&&r!l&&!r
000
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname $c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
ABresult
1X1
011
000
341 0 ▶ next unless $n;
Branch: 1 branch
BranchTrueFalseTotal
unless $n 0 0 0
342 0 ▶ if ($n eq 'ticketNumber')
Branch: 2 branches
BranchTrueFalseTotal
if ($n eq 'ticketNumber') { } 0 0 0
elsif ($n eq 'reason') { } 0 0 0
343 {
344 0 $rinfo->{$otype}->{$oname}->{ticket}=$c->getFirstChild()->getData();
345 } elsif ($n eq 'reason')
346 {
347 0 $rinfo->{$otype}->{$oname}->{reason}=$c->getFirstChild()->getData();
348 0 ▶ $rinfo->{$otype}->{$oname}->{reason_lang}=$c->getAttribute('lang') || 'en';
Condition0%0/2
$c->getAttribute('lang') || 'en'
l!l
00
MC/DC0%0/1
$c->getAttribute('lang') || 'en'
$c->getAttribute('lang')
Truth table0%0/2
A
A= $c->getAttribute('lang')
Aresult
11
00
349 }
350 0 } continue { $c=$c->getNextSibling(); }
351 0 return;
352 }
353  
354 ####################################################################################################
355 1 1;
« DRI/Protocol/RRI/Domain.pm ↑ Summary DRI/Protocol/EPP/Extensions/CZ/NSSET.pm »