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 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 {
27 0 ▶ my ($ns,$rd)=@_;
Subroutine create: not called CC=2 SCAR=17.9
Pod undocumented
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 [$ns.':maintainerUrl',$rd->{maintainer_url}];
30 }
31  
32 sub update
33 {
34 0 ▶ my ($ns,$todo)=@_;
Subroutine update: not called CC=3 SCAR=24.8
Pod undocumented
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 [$ns.':maintainerUrl',$todo->set('maintainer_url')];
39 }
40  
41 sub info_parse
42 {
43 0 ▶ my ($ns,$infdata)=@_;
Subroutine info_parse: not called CC=3 SCAR=24.8
Pod undocumented
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__
53  
54 =pod
55  
56 =head1 NAME
57  
58 Net::DRI::Protocol::EPP::Extensions::Afilias::MaintainerUrl - Afilias maintainerUrl extension for Net::DRI
59  
60 =head1 DESCRIPTION
61  
62 Please see the README file for details.
63  
64 =head1 SUPPORT
65  
66 For now, support questions should be sent to:
67  
68 E<lt>netdri@dotandco.comE<gt>
69  
70 Please also see the SUPPORT file in the distribution.
71  
72 =head1 SEE ALSO
73  
74 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
75  
76 =head1 AUTHOR
77  
78 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
79  
80 =head1 COPYRIGHT
81  
82 Copyright (c) 2010 Patrick Mevzek <netdri@dotandco.com>.
83 All rights reserved.
84  
85 This program is free software; you can redistribute it and/or modify
86 it under the terms of the GNU General Public License as published by
87 the Free Software Foundation; either version 2 of the License, or
88 (at your option) any later version.
89  
90 See the LICENSE file that comes with this distribution for more details.
91  
92 =cut
« DRI/Data/StatusList.pm ↑ Summary DRI/Protocol/EPP/Extensions/AusRegistry/Sync.pm »