DRI/Protocol/EPP/Extensions/SIDN/Host.pm

filter: Statementstmt 34.4% 10 / 29 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 0.0% 0 / 2 totaltotal 29.5% 13 / 44 CC 6 SCAR 32.5
CC
6
Cov
27%
info_parse
42.0
register_commands
2.0
BEGIN
1.0
CRAP 25.7
« DRI/Protocol/EPP/Extensions/AT/Contact.pm ↑ Summary DRI/Protocol/EPP/Extensions/Nomulus/Metadata.pm »
1 ## Domain Registry Interface, SIDN EPP Host commands
2 ##
3 ## Copyright (c) 2009,2013 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::SIDN::Host;
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  
22 ####################################################################################################
23  
24 sub register_commands
25 0 ▶{
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
26 0 my ($class,$version)=@_;
27 0 my %tmp=( info => [ undef, \&info_parse ],
28 );
29  
30 0 return { 'host' => \%tmp };
31 }
32  
33 ####################################################################################################
34 ########### Query commands
35  
36 sub info_parse
37 0 ▶{
Subroutine info_parse: not called CC=6 SCAR=37.4
Pod undocumented
38 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
39 0 my $mes=$po->message();
40 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
41  
42 0 my $infdata=$mes->get_extension('sidn','ext');
43 0 ▶ return unless defined $infdata;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $infdata 0 0 0
44  
45 0 my $ns=$mes->ns('sidn');
46 0 $infdata=Net::DRI::Util::xml_traverse($infdata,$ns,'infData','host');
47 0 ▶ return unless defined $infdata;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $infdata 0 0 0
48  
49 0 my $ho=$rinfo->{host}->{$oname}->{self};
50  
51 0 foreach my $el (Net::DRI::Util::xml_list_children($infdata))
52 {
53 0 my ($name,$c)=@$el;
54 0 ▶ if ($name eq 'limited')
Branch: 1 branch
BranchTrueFalseTotal
if ($name eq "limited") 0 0 0
55 {
56 0 my $v=Net::DRI::Util::xml_parse_boolean($c->textContent());
57 0 $rinfo->{host}->{$oname}->{limited}=$v;
58 0 $rinfo->{host}->{$oname}->{self}->add($oname,undef,undef,{limited => $v});
59 }
60 }
61 0 return;
62 }
63  
64 ####################################################################################################
65 1 1;
66  
67 __END__
« DRI/Protocol/EPP/Extensions/AT/Contact.pm ↑ Summary DRI/Protocol/EPP/Extensions/Nomulus/Metadata.pm »