DRI/Protocol/EPP/Extensions/MOBI/Domain.pm

filter: Statementstmt 32.5% 13 / 40 Branchbran 0.0% 0 / 10 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 0.0% 0 / 5 totaltotal 26.5% 17 / 64 CC 6 SCAR 20.8
CC
6
Cov
26%
info_parse
20.0
create
6.0
update
6.0
CRAP 8.0
« DRI/Protocol/EPP/Extensions/VeriSign/IDNLanguage.pm ↑ Summary DRI/Protocol/Whois/Domain/ORG.pm »
1 ## Domain Registry Interface, .MOBI Domain EPP extension commands
2 ##
3 ## Copyright (c) 2006-2008,2010,2013,2016 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::MOBI::Domain;
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::Exception;
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶use Net::DRI::Protocol::EPP::Extensions::Afilias::MaintainerUrl;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 =pod
24  
25 =head1 NAME
26  
27 Net::DRI::Protocol::EPP::Extensions::MOBI::Domain - .MOBI EPP Domain extension commands for Net::DRI
28  
29 =head1 DESCRIPTION
30  
31 Please see the README file for details.
32  
33 =head1 SUPPORT
34  
35 For now, support questions should be sent to:
36  
37 E<lt>netdri@dotandco.comE<gt>
38  
39 Please also see the SUPPORT file in the distribution.
40  
41 =head1 SEE ALSO
42  
43 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
44  
45 =head1 AUTHOR
46  
47 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
48  
49 =head1 COPYRIGHT
50  
51 Copyright (c) 2006-2008,2010,2013,2016 Patrick Mevzek <netdri@dotandco.com>.
52 All rights reserved.
53  
54 This program is free software; you can redistribute it and/or modify
55 it under the terms of the GNU General Public License as published by
56 the Free Software Foundation; either version 2 of the License, or
57 (at your option) any later version.
58  
59 See the LICENSE file that comes with this distribution for more details.
60  
61 =cut
62  
63 ####################################################################################################
64  
65 sub register_commands
66 {
67 0 ▶ my ($class,$version)=@_;
Subroutine register_commands: not called CC=1 SCAR=6.9
Pod undocumented
68 0 my %tmp=(
69 create => [ \&create, undef ],
70 update => [ \&update, undef ],
71 info => [ undef, \&info_parse ],
72 );
73  
74 0 return { 'domain' => \%tmp };
75 }
76  
77 ####################################################################################################
78  
79 sub add_maintainer_url
80 {
81 0 ▶ my ($mes,$tag,$d)=@_;
Subroutine add_maintainer_url: not called CC=1 SCAR=6.9
Pod undocumented
82 0 my $eid=$mes->command_extension_register('mobi', $tag);
83 0 $mes->command_extension($eid,$d);
84 0 return;
85 }
86  
87 sub create
88 {
89 0 ▶ my ($epp,$domain,$rd)=@_;
Subroutine create: not called CC=2 SCAR=17.9
Pod undocumented
90 0 my $mes=$epp->message();
91  
92 0 my $d=Net::DRI::Protocol::EPP::Extensions::Afilias::MaintainerUrl::create('mobi',$rd);
93 0 ▶ return unless defined $d;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $d 0 0 0
94 0 add_maintainer_url($mes,'create',$d);
95 0 return;
96 }
97  
98 sub update
99 {
100 0 ▶ my ($epp,$domain,$todo)=@_;
Subroutine update: not called CC=2 SCAR=17.9
Pod undocumented
101 0 my $mes=$epp->message();
102  
103 0 my $d=Net::DRI::Protocol::EPP::Extensions::Afilias::MaintainerUrl::update('mobi',$todo);
104 0 ▶ return unless defined $d;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $d 0 0 0
105 0 add_maintainer_url($mes,'update',$d);
106 0 return;
107 }
108  
109 sub info_parse
110 {
111 0 ▶ my ($po,$otype,$oaction,$oname,$rinfo)=@_;
Subroutine info_parse: not called CC=4 SCAR=30.0
Pod undocumented
112 0 my $mes=$po->message();
113 0 ▶ return unless $mes->is_success();
Branch: 1 branch
BranchTrueFalseTotal
unless $mes->is_success 0 0 0
114  
115 0 my $infdata=$mes->get_extension('mobi','infData');
116 0 ▶ return unless $infdata;
Branch: 1 branch
BranchTrueFalseTotal
unless $infdata 0 0 0
117  
118 0 my $c=Net::DRI::Protocol::EPP::Extensions::Afilias::MaintainerUrl::info_parse($mes->ns('mobi'),$infdata);
119 0 ▶ $rinfo->{$otype}->{$oname}->{maintainer_url}=$c if defined $c;
Branch: 1 branch
BranchTrueFalseTotal
if defined $c 0 0 0
120 0 return;
121 }
122  
123 ####################################################################################################
124 1 1;
« DRI/Protocol/EPP/Extensions/VeriSign/IDNLanguage.pm ↑ Summary DRI/Protocol/Whois/Domain/ORG.pm »