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

filter: Statementstmt 52.0% 13 / 25 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 57.1% 4 / 7 Podpod 0.0% 0 / 3 totaltotal 35.4% 17 / 48 CC 6 SCAR 19.9
CC
6
Cov
36%
update
12.0
info_parse
12.0
create
6.0
CRAP 7.3
« DRI/Data/StatusList.pm ↑ Summary DRI/Protocol/EPP/Extensions/AusRegistry/Sync.pm »
1 ## Domain Registry Interface, Afilias maintainerUrl EPP extension
2 ##
3 ## Copyright (c) 2010,2019 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::Afilias::MaintainerUrl;
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  
20 1 ▶use Net::DRI::Util;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶use Net::DRI::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 ####################################################################################################
24  
25 sub create
26 0 ▶{
Subroutine create: not called CC=2 SCAR=17.9
Pod undocumented
27 0 my ($rd)=@_;
28 0 ▶ return unless Net::DRI::Util::has_key($rd,'maintainer_url');
Branch: 1 branch
BranchTrueFalseTotal
unless Net::DRI::Util::has_key($rd, "maintainer_url") 0 0 0
29 0 return ['maintainerUrl',$rd->{maintainer_url}];
30 }
31  
32 sub update
33 0 ▶{
Subroutine update: not called CC=3 SCAR=24.8
Pod undocumented
34 0 my ($todo)=@_;
35  
36 0 ▶ Net::DRI::Exception->die(0,'protocol/EPP',11,'Only maintainer_url set available for domain') if (grep { ! /^(?:set)$/ } $todo->types('maintainer_url'));
Branch: 1 branch
BranchTrueFalseTotal
if grep {not /^(?:set)$/;} $todo->types("maintainer_url") 0 0 0
37 0 ▶ return unless $todo->set('maintainer_url');
Branch: 1 branch
BranchTrueFalseTotal
unless $todo->set("maintainer_url") 0 0 0
38 0 return ['maintainerUrl',$todo->set('maintainer_url')];
39 }
40  
41 sub info_parse
42 0 ▶{
Subroutine info_parse: not called CC=3 SCAR=24.8
Pod undocumented
43 0 my ($ns,$infdata)=@_;
44 0 my $c=$infdata->getChildrenByTagNameNS($ns,'maintainerUrl');
45 0 ▶ return unless (defined $c && $c->size()==1);
Branch: 1 branch
BranchTrueFalseTotal
unless defined $c and $c->size == 1 0 0 0
Condition0%0/3
defined $c and $c->size == 1
!ll&&!rl&&r
000
MC/DC0%0/2
defined $c and $c->size == 1
defined $c $c->size == 1
Truth table0%0/3
A and B
A= defined $cB= $c->size == 1
ABresult
0X0
100
111
46 0 return $c->get_node(1)->textContent();
47 }
48  
49 ####################################################################################################
50 1 1;
51  
52 __END__
« DRI/Data/StatusList.pm ↑ Summary DRI/Protocol/EPP/Extensions/AusRegistry/Sync.pm »