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 {
26 0 ▶ my ($class,$version)=@_;
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
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 {
38 0 ▶ my ($po,$otype,$oaction,$oname,$rinfo)=@_;
Subroutine info_parse: not called CC=6 SCAR=37.4
Pod undocumented
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__
68  
69 =pod
70  
71 =head1 NAME
72  
73 Net::DRI::Protocol::EPP::Extensions::SIDN::Host - SIDN EPP Host commands for Net::DRI
74  
75 =head1 DESCRIPTION
76  
77 Please see the README file for details.
78  
79 =head1 SUPPORT
80  
81 For now, support questions should be sent to:
82  
83 E<lt>netdri@dotandco.comE<gt>
84  
85 Please also see the SUPPORT file in the distribution.
86  
87 =head1 SEE ALSO
88  
89 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
90  
91 =head1 AUTHOR
92  
93 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
94  
95 =head1 COPYRIGHT
96  
97 Copyright (c) 2009,2013 Patrick Mevzek <netdri@dotandco.com>.
98 All rights reserved.
99  
100 This program is free software; you can redistribute it and/or modify
101 it under the terms of the GNU General Public License as published by
102 the Free Software Foundation; either version 2 of the License, or
103 (at your option) any later version.
104  
105 See the LICENSE file that comes with this distribution for more details.
106  
107 =cut
« DRI/Protocol/EPP/Extensions/AT/Contact.pm ↑ Summary DRI/Protocol/EPP/Extensions/Nomulus/Metadata.pm »