File Coverage

blib/lib/Net/DRI/Protocol/EPP/Extensions/DNSBE/Message.pm
Criterion Covered Total %
statement 6 15 40.0
branch 0 2 0.0
condition n/a
subroutine 2 4 50.0
pod 0 2 0.0
total 8 23 34.7


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, EPP Message for DNSBE
2             ##
3             ## Copyright (c) 2006,2008-2010,2013 Patrick Mevzek . 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::DNSBE::Message;
16              
17 1     1   672 use strict;
  1         1  
  1         28  
18 1     1   4 use warnings;
  1         2  
  1         164  
19              
20             =pod
21              
22             =head1 NAME
23              
24             Net::DRI::Protocol::EPP::Extensions::DNSBE::Message - DNSBE EPP 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             Enetdri@dotandco.comE
35              
36             Please also see the SUPPORT file in the distribution.
37              
38             =head1 SEE ALSO
39              
40             Ehttp://www.dotandco.com/services/software/Net-DRI/E
41              
42             =head1 AUTHOR
43              
44             Patrick Mevzek, Enetdri@dotandco.comE
45              
46             =head1 COPYRIGHT
47              
48             Copyright (c) 2006,2008-2010,2013 Patrick Mevzek .
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             {
64 0     0 0   my ($class,$version)=@_;
65 0           return { 'message' => { 'result' => [ undef, \&parse ] } };
66             }
67              
68             sub parse
69             {
70 0     0 0   my ($po,$otype,$oaction,$oname,$rinfo)=@_;
71 0           my $mes=$po->message();
72              
73             ## Parse dnsbe:ext
74 0           my $result=$mes->get_extension('dnsbe','result');
75 0 0         return unless $result;
76              
77             ## We add it to the latest status extra_info seen.
78 0           foreach my $el ($result->getChildrenByTagNameNS($mes->ns('dnsbe'),'msg'))
79             {
80 0           $mes->add_to_extra_info({from => 'dnsbe', type => 'text', message => $el->textContent()});
81             }
82 0           return;
83             }
84              
85             ####################################################################################################
86             1;