| 1 | ## Domain Registry Interface, EPP Domain commands (RFC5731) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | ## Copyright (c) 2005-2010,2012-2016,2018 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::Core::Domain; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use utf8; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use Net::DRI::Exception; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | ▶ | use Net::DRI::Protocol::EPP::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | Net::DRI::Protocol::EPP::Core::Domain - EPP Domain commands (RFC5731) for Net::DRI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | Please see the README file for details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | Copyright (c) 2005-2010,2012-2016,2018 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | sub register_commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | my ($class,$version)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | my %tmp=( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | check => [ \&check, \&check_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | info => [ \&info, \&info_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | transfer_query => [ \&transfer_query, \&transfer_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | create => [ \&create, \&create_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | delete => [ \&delete ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | renew => [ \&renew, \&renew_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | transfer_request => [ \&transfer_request, \&transfer_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | transfer_cancel => [ \&transfer_cancel,\&transfer_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | transfer_answer => [ \&transfer_answer,\&transfer_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | update => [ \&update ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | review_complete => [ undef, \&pandata_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | $tmp{check_multi}=$tmp{check}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | 0 | return { 'domain' => \%tmp }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | ########### Query commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | sub check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'check',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | sub check_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_parse: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | my $chkdata=$mes->get_response('domain','chkData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | 0 | ▶ | return unless defined $chkdata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | 0 | foreach my $cd ($chkdata->getChildrenByTagNameNS($mes->ns('domain'),'cd')) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | my $domain; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($cd)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 0 | my ($n,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | 0 | ▶ | if ($n eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | $domain=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | $rinfo->{domain}->{$domain}->{action}='check'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | $rinfo->{domain}->{$domain}->{exist}=1-Net::DRI::Util::xml_parse_boolean($c->getAttribute('avail')); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | } elsif ($n eq 'reason') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | 0 | $rinfo->{domain}->{$domain}->{exist_reason}=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | sub info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | ▶ | my $hosts=(defined $rd && ref $rd eq 'HASH' && exists $rd->{hosts} && $rd->{hosts}=~m/^(?:all|del|sub|none)$/)? $rd->{hosts} : 'all'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
defined $rd and ref $rd eq "HASH" and exists $rd->{"hosts"} and $rd->{"hosts"} =~ /^(?:all|del|sub|none)$/
defined $rd and ref $rd eq "HASH" and exists $rd->{"hosts"}
defined $rd and ref $rd eq "HASH"
MC/DC0%0/4
defined $rd and ref $rd eq "HASH" and exists $rd->{"hosts"} and $rd->{"hosts"} =~ /^(?:all|del|sub|none)$/
defined $rd
ref $rd eq "HASH"
exists $rd->{"hosts"}
$rd->{"hosts"} =~ /^(?:all|del|sub|none)$/
Truth table0%0/5
A and B and C and D
A= defined $rdB= ref $rd eq "HASH"C= exists $rd->{"hosts"}D= $rd->{"hosts"} =~ /^(?:all|del|sub|none)$/
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'info',$domain,{'hosts'=> $hosts}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | sub info_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=17 SCAR=57.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | 0 | my $infdata=$mes->get_response('domain','infData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | ▶ | return unless defined $infdata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | my (@s,@host); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | my $cs=$po->create_local_object('contactset'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | my %ccache; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($infdata)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | my ($name,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 10 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | $oname=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | $rinfo->{domain}->{$oname}->{action}='info'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | } elsif ($name eq 'roid') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | $rinfo->{domain}->{$oname}->{roid}=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | } elsif ($name eq 'status') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | push @s,Net::DRI::Protocol::EPP::Util::parse_node_status($c); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | } elsif ($name eq 'registrant') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | 0 | my $id=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | $ccache{$id}=$po->create_local_object('contact')->srid($id) unless exists $ccache{$id}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | $cs->set($ccache{$id},'registrant'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | } elsif ($name eq 'contact') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | my $id=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | $ccache{$id}=$po->create_local_object('contact')->srid($id) unless exists $ccache{$id}; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | $cs->add($ccache{$id},$c->getAttribute('type')); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | } elsif ($name eq 'ns') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | $rinfo->{domain}->{$oname}->{ns}=Net::DRI::Protocol::EPP::Util::parse_ns($po,$c); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | } elsif ($name eq 'host') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | push @host,$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | } elsif ($name=~m/^(clID|crID|upID)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | $rinfo->{domain}->{$oname}->{$1}=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | } elsif ($name=~m/^(crDate|upDate|trDate|exDate)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | $rinfo->{domain}->{$oname}->{$1}=$po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | } elsif ($name eq 'authInfo') ## we only try to parse the authInfo version defined in the RFC, other cases are to be handled by extensions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | 0 | $rinfo->{domain}->{$oname}->{auth}={pw => Net::DRI::Util::xml_child_content($c,$mes->ns('domain'),'pw')}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | $rinfo->{domain}->{$oname}->{contact}=$cs; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | $rinfo->{domain}->{$oname}->{status}=$po->create_local_object('status')->add(@s); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | $rinfo->{domain}->{$oname}->{subordinate_hosts}=$po->create_local_object('hosts')->set(@host) if @host; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | sub transfer_query | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_query: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,['transfer',{'op'=>'query'}],$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | sub transfer_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_parse: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | my $trndata=$mes->get_response('domain','trnData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | 0 | ▶ | return unless defined $trndata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($trndata)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | my ($name,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | 0 | $oname=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | $rinfo->{domain}->{$oname}->{action}='transfer'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | } elsif ($name=~m/^(trStatus|reID|acID)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | 0 | $rinfo->{domain}->{$oname}->{$1}=$c->textContent(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | } elsif ($name=~m/^(reDate|acDate|exDate)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | $rinfo->{domain}->{$oname}->{$1}=$po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | ############ Transform commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | sub create | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: not called CC=16 SCAR=56.1
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'create',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | my $def=$epp->default_parameters(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | ▶ | if ($def && (ref($def) eq 'HASH') && exists($def->{domain_create}) && (ref($def->{domain_create}) eq 'HASH')) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
$def and ref $def eq "HASH" and exists $def->{"domain_create"} and ref $def->{"domain_create"} eq "HASH"
$def and ref $def eq "HASH" and exists $def->{"domain_create"}
$def and ref $def eq "HASH"
MC/DC0%0/4
$def and ref $def eq "HASH" and exists $def->{"domain_create"} and ref $def->{"domain_create"} eq "HASH"
$def
ref $def eq "HASH"
exists $def->{"domain_create"}
ref $def->{"domain_create"} eq "HASH"
Truth table0%0/5
A and B and C and D
A= $defB= ref $def eq "HASH"C= exists $def->{"domain_create"}D= ref $def->{"domain_create"} eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | ▶ | $rd={} unless ($rd && ref $rd eq 'HASH' && keys %$rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$rd and ref $rd eq "HASH" and keys %$rd
$rd and ref $rd eq "HASH"
MC/DC0%0/3
$rd and ref $rd eq "HASH" and keys %$rd
$rd
ref $rd eq "HASH"
keys %$rd
Truth table0%0/4
A and B and C
A= $rdB= ref $rd eq "HASH"C= keys %$rd
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | 0 | ▶ | while(my ($k,$v)=each(%{$def->{domain_create}})) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | ▶ | next if exists($rd->{$k}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | 0 | $rd->{$k}=$v; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | ## Period, OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_period($rd->{duration}) if Net::DRI::Util::has_duration($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | ## Nameservers, OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_ns($epp,$rd->{ns},$domain) if Net::DRI::Util::has_ns($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | ## Contacts, all OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | 0 | ▶ | if (Net::DRI::Util::has_contact($rd)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | 0 | my $cs=$rd->{contact}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | my @o=$cs->get('registrant'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | ▶ | push @d,['domain:registrant',$o[0]->srid()] if (@o && Net::DRI::Util::isa_contact($o[0])); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
@o and Net::DRI::Util::isa_contact($o[0])
MC/DC0%0/2
@o and Net::DRI::Util::isa_contact($o[0])
@o
Net::DRI::Util::isa_contact($o[0])
Truth table0%0/3
A and B
A= @oB= Net::DRI::Util::isa_contact($o[0])
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | push @d,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cs); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | ## AuthInfo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('authInfo is mandatory') unless Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | 0 | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | sub create_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create_parse: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | 0 | my $credata=$mes->get_response('domain','creData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | 0 | ▶ | return unless defined $credata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($credata)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | 0 | my ($name,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | 0 | $oname=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | 0 | $rinfo->{domain}->{$oname}->{action}='create'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | } elsif ($name=~m/^(crDate|exDate)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | 0 | $rinfo->{domain}->{$oname}->{$1}=$po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | sub delete ## no critic (Subroutines::ProhibitBuiltinHomonyms) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'delete',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | sub renew | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
renew: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('current expiration date') unless Net::DRI::Util::has_key($rd,'current_expiration'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | 0 | my $curexp = $rd->{current_expiration}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | 0 | ▶ | $curexp=$curexp->clone()->set_time_zone('UTC')->strftime('%Y-%m-%d') if (ref($curexp) && Net::DRI::Util::check_isa($curexp,'DateTime')); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $curexp and Net::DRI::Util::check_isa($curexp, "DateTime")
MC/DC0%0/2
ref $curexp and Net::DRI::Util::check_isa($curexp, "DateTime")
ref $curexp
Net::DRI::Util::check_isa($curexp, "DateTime")
Truth table0%0/3
A and B
A= ref $curexpB= Net::DRI::Util::check_isa($curexp, "DateTime")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('current expiration date must be YYYY-MM-DD') unless $curexp=~m/^\d{4}-\d{2}-\d{2}$/; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'renew',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | 0 | push @d,['domain:curExpDate',$curexp]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_period($rd->{duration}) if Net::DRI::Util::has_duration($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | sub renew_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
renew_parse: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | 0 | my $rendata=$mes->get_response('domain','renData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | 0 | ▶ | return unless defined $rendata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($rendata)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | my ($name,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | $oname=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | $rinfo->{domain}->{$oname}->{action}='renew'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | } elsif ($name=~m/^(exDate)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | 0 | $rinfo->{domain}->{$oname}->{$1}=$po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | sub transfer_request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_request: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,['transfer',{'op'=>'request'}],$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_period($rd->{duration}) if Net::DRI::Util::has_duration($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | sub transfer_answer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_answer: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | ▶ | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,['transfer',{'op'=>(Net::DRI::Util::has_key($rd,'approve') && $rd->{approve})? 'approve' : 'reject'}],$domain); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
Net::DRI::Util::has_key($rd, "approve") and $rd->{"approve"}
MC/DC0%0/2
Net::DRI::Util::has_key($rd, "approve") and $rd->{"approve"}
Net::DRI::Util::has_key($rd, "approve")
$rd->{"approve"}
Truth table0%0/3
A and B
A= Net::DRI::Util::has_key($rd, "approve")B= $rd->{"approve"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | sub transfer_cancel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_cancel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,['transfer',{'op'=>'cancel'}],$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | sub update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | 0 | ▶ | my ($epp,$domain,$todo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update: not called CC=15 SCAR=54.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters($todo.' must be a non empty Net::DRI::Data::Changes object') unless Net::DRI::Util::isa_changes($todo); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | 0 | my $nsadd=$todo->add('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | my $nsdel=$todo->del('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | 0 | my $sadd=$todo->add('status'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | my $sdel=$todo->del('status'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | my $cadd=$todo->add('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | my $cdel=$todo->del('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | 0 | my (@add,@del); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | 0 | ▶ | push @add,Net::DRI::Protocol::EPP::Util::build_ns($epp,$nsadd,$domain) if Net::DRI::Util::isa_hosts($nsadd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | ▶ | push @add,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cadd) if Net::DRI::Util::isa_contactset($cadd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 0 | ▶ | push @add,$sadd->build_xml('domain:status','core') if Net::DRI::Util::isa_statuslist($sadd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | 0 | ▶ | push @del,Net::DRI::Protocol::EPP::Util::build_ns($epp,$nsdel,$domain,undef,1) if Net::DRI::Util::isa_hosts($nsdel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | ▶ | push @del,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cdel) if Net::DRI::Util::isa_contactset($cdel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | 0 | ▶ | push @del,$sdel->build_xml('domain:status','core') if Net::DRI::Util::isa_statuslist($sdel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'update',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | ▶ | push @d,['domain:add',@add] if @add; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | ▶ | push @d,['domain:rem',@del] if @del; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | 0 | my $chg=$todo->set('registrant'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | 0 | my @chg; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | push @chg,['domain:registrant',$chg->srid()] if Net::DRI::Util::isa_contact($chg); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | $chg=$todo->set('auth'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | ▶ | push @chg,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$chg,1) if ($chg && (ref $chg eq 'HASH') && exists $chg->{pw}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
$chg and ref $chg eq "HASH" and exists $chg->{"pw"}
$chg and ref $chg eq "HASH"
MC/DC0%0/3
$chg and ref $chg eq "HASH" and exists $chg->{"pw"}
$chg
ref $chg eq "HASH"
exists $chg->{"pw"}
Truth table0%0/4
A and B and C
A= $chgB= ref $chg eq "HASH"C= exists $chg->{"pw"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | 0 | ▶ | push @d,['domain:chg',@chg] if @chg; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | ## RFC4931 §3.3 Offline Review of Requested Actions | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | sub pandata_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
pandata_parse: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | 0 | my $pandata=$mes->get_response('domain','panData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | ▶ | return unless defined $pandata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($pandata)) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my ($name,$c)=@$el; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | $oname=lc($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | $rinfo->{domain}->{$oname}->{action}='review'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | 0 | $rinfo->{domain}->{$oname}->{result}=Net::DRI::Util::xml_parse_boolean($c->getAttribute('paResult')); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | } elsif ($name eq 'paTRID') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | 0 | my $ns=$mes->ns('epp'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | 0 | my $tmp=Net::DRI::Util::xml_child_content($c,$ns,'clTRID'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | ▶ | $rinfo->{domain}->{$oname}->{trid}=$tmp if defined $tmp; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | 0 | $rinfo->{domain}->{$oname}->{svtrid}=Net::DRI::Util::xml_child_content($c,$ns,'svTRID'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | } elsif ($name eq 'paDate') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | $rinfo->{domain}->{$oname}->{date}=$po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||