DRI/Protocol/EPP/Extensions/EURid/Message.pm

filter: Statementstmt 35.0% 7 / 20 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 0.0% 0 / 2 totaltotal 30.0% 9 / 30 CC 4 SCAR 24.8
CC
4
Cov
29%
parse
20.0
register_commands
2.0
BEGIN
1.0
CRAP 12.0
« DRI/Protocol/Whois/Domain/EU.pm ↑ Summary DRI/Protocol/Whois/Message.pm »
1 ## Domain Registry Interface, EPP Message for EURid
2 ##
3 ## Copyright (c) 2005,2006,2008-2010,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::EURid::Message;
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 =pod
21  
22 =head1 NAME
23  
24 Net::DRI::Protocol::EPP::Extensions::EURid::Message - EPP EURid Message for Net::DRI
25  
26 =head1 DESCRIPTION
27  
28 Please see the README file for details.
29  
30 =head1 SUPPORT
31  
32 For now, support questions should be sent to:
33  
34 E<lt>netdri@dotandco.comE<gt>
35  
36 Please also see the SUPPORT file in the distribution.
37  
38 =head1 SEE ALSO
39  
40 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
41  
42 =head1 AUTHOR
43  
44 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
45  
46 =head1 COPYRIGHT
47  
48 Copyright (c) 2005,2006,2008-2010,2013 Patrick Mevzek <netdri@dotandco.com>.
49 All rights reserved.
50  
51 This program is free software; you can redistribute it and/or modify
52 it under the terms of the GNU General Public License as published by
53 the Free Software Foundation; either version 2 of the License, or
54 (at your option) any later version.
55  
56 See the LICENSE file that comes with this distribution for more details.
57  
58 =cut
59  
60 ####################################################################################################
61  
62 sub register_commands
63 0 ▶{
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
64 0 my ($class,$version)=@_;
65 0 return { 'message' => { 'result' => [ undef, \&parse ] } };
66 }
67  
68 sub parse
69 0 ▶{
Subroutine parse: not called CC=4 SCAR=30.0
Pod undocumented
70 0 my ($po,$otype,$oaction,$oname,$rinfo)=@_;
71 0 my $mes=$po->message();
72  
73 ## Parse eurid:ext
74 0 my $result=$mes->get_extension('eurid','ext');
75 0 ▶ return unless $result;
Branch: 1 branch
BranchTrueFalseTotal
unless $result 0 0 0
76 0 my $ns=$mes->ns('eurid');
77 0 $result=$result->getChildrenByTagNameNS($ns,'result');
78 0 ▶ return unless $result->size();
Branch: 1 branch
BranchTrueFalseTotal
unless $result->size 0 0 0
79 0 $result=$result->get_node(1);
80  
81 ## We add it to the latest status extra_info seen.
82 0 foreach my $el ($result->getChildrenByTagNameNS($ns,'msg'))
83 {
84 0 $mes->add_to_extra_info({from => 'eurid', type => 'text', message => $el->textContent()});
85 }
86 0 return;
87 }
88  
89 ####################################################################################################
90 1 1;
« DRI/Protocol/Whois/Domain/EU.pm ↑ Summary DRI/Protocol/Whois/Message.pm »