| 1 | ## Domain Registry Interface, EURid Sunrise EPP extension for Net::DRI | ||||||||||||||||||||||||||||||||||
| 2 | ## (from registration_guidelines_v1_0F-appendix2-sunrise.pdf ) | ||||||||||||||||||||||||||||||||||
| 3 | ## | ||||||||||||||||||||||||||||||||||
| 4 | ## Copyright (c) 2005,2007-2010,2012,2013,2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||||||||||||||||||||||||||
| 5 | ## | ||||||||||||||||||||||||||||||||||
| 6 | ## This file is part of Net::DRI | ||||||||||||||||||||||||||||||||||
| 7 | ## | ||||||||||||||||||||||||||||||||||
| 8 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||
| 9 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||
| 10 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||
| 11 | ## (at your option) any later version. | ||||||||||||||||||||||||||||||||||
| 12 | ## | ||||||||||||||||||||||||||||||||||
| 13 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||
| 14 | #################################################################################################### | ||||||||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||||||||
| 16 | package Net::DRI::Protocol::EPP::Extensions::EURid::Sunrise; | ||||||||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||||||||
| 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 Email::Valid; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use DateTime::Format::ISO8601; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 25 | 1 | ▶ | use Net::DRI::Exception; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 26 | 1 | ▶ | use Net::DRI::Protocol::EPP::Extensions::EURid::Domain; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 27 | 1 | ▶ | use Net::DRI::DRD::EURid; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 28 | 1 | ▶ | use Net::DRI::Protocol::EPP::Util; | ||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||
| 30 | =pod | ||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||
| 32 | =head1 NAME | ||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||
| 34 | Net::DRI::Protocol::EPP::Extensions::EURid::Sunrise - EURid Sunrise EPP extension for Net::DRI | ||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||
| 36 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||
| 38 | Please see the README file for details. | ||||||||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||||||||
| 40 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||
| 42 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||
| 44 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||
| 46 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||
| 48 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||||||||
| 50 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||||||||
| 52 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||
| 54 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||
| 56 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||||||||
| 58 | Copyright (c) 2005,2007-2010,2012,2013,2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||||||||
| 59 | All rights reserved. | ||||||||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||||||||
| 61 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||
| 62 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||
| 63 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||
| 64 | (at your option) any later version. | ||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||
| 66 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||
| 68 | =cut | ||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||
| 70 | #################################################################################################### | ||||||||||||||||||||||||||||||||||
| 71 | |||||||||||||||||||||||||||||||||||
| 72 | sub register_commands | ||||||||||||||||||||||||||||||||||
| 73 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 74 | 0 | my ($class,$version)=@_; | |||||||||||||||||||||||||||||||||
| 75 | 0 | my %tmp=( | |||||||||||||||||||||||||||||||||
| 76 | apply => [ \&apply, \&apply_parse ], | ||||||||||||||||||||||||||||||||||
| 77 | apply_info => [ \&info, \&info_parse ], | ||||||||||||||||||||||||||||||||||
| 78 | ); | ||||||||||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||||||||
| 80 | 0 | return { 'domain' => \%tmp }; | |||||||||||||||||||||||||||||||||
| 81 | } | ||||||||||||||||||||||||||||||||||
| 82 | |||||||||||||||||||||||||||||||||||
| 83 | sub setup | ||||||||||||||||||||||||||||||||||
| 84 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 85 | 0 | my ($class,$po,$version)=@_; | |||||||||||||||||||||||||||||||||
| 86 | 0 | $po->ns({ 'sunrise' => 'http://www.eurid.eu/xml/epp/sunrise-1.0' }); | |||||||||||||||||||||||||||||||||
| 87 | 0 | return; | |||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||
| 90 | #################################################################################################### | ||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||
| 92 | ########### Query commands | ||||||||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||||||||
| 94 | sub info | ||||||||||||||||||||||||||||||||||
| 95 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
info: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 96 | 0 | my ($epp,$reference)=@_; | |||||||||||||||||||||||||||||||||
| 97 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||
| 99 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('Apply_info action needs a reference') unless defined($reference) && $reference; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $reference and $reference
MC/DC0%0/2
defined $reference and $reference
defined $reference
$reference
Truth table0%0/3
A and B
A= defined $referenceB= $reference
| |||||||||||||||||||||||||||||||||||
| 100 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('reference must be a xml normalizedstring from 1 to 100 characters long') unless Net::DRI::Util::xml_is_normalizedstring($reference,1,100); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||||||||
| 102 | 0 | $mes->command(['apply-info','domain:apply-info',sprintf('xmlns:domain="%s"',$mes->nsattrs('domain'))]); | |||||||||||||||||||||||||||||||||
| 103 | 0 | $mes->command_body([['domain:reference',$reference]]); | |||||||||||||||||||||||||||||||||
| 104 | 0 | return; | |||||||||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||||||||
| 107 | sub info_parse | ||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=13 SCAR=52.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 109 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||||||||||||||||||||||||||
| 110 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 112 | |||||||||||||||||||||||||||||||||||
| 113 | 0 | my $infdata=$mes->get_response('domain','appInfoData'); | |||||||||||||||||||||||||||||||||
| 114 | 0 | ▶ | return unless $infdata; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||||||
| 116 | 0 | my $cs=Net::DRI::Data::ContactSet->new(); | |||||||||||||||||||||||||||||||||
| 117 | 0 | my $pd=DateTime::Format::ISO8601->new(); | |||||||||||||||||||||||||||||||||
| 118 | 0 | my $c=$infdata->firstChild(); | |||||||||||||||||||||||||||||||||
| 119 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 120 | { | ||||||||||||||||||||||||||||||||||
| 121 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 122 | 0 | my $name=$c->nodeName(); | |||||||||||||||||||||||||||||||||
| 123 | 0 | ▶ | next unless $name; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | if ($name=~m/^domain:(name|reference|code)$/) | ||||||||||||||||||||||||||||||||
|
Branch: 7 branches
| |||||||||||||||||||||||||||||||||||
| 126 | { | ||||||||||||||||||||||||||||||||||
| 127 | 0 | $rinfo->{domain}->{$oname}->{$1}=$c->firstChild->getData(); | |||||||||||||||||||||||||||||||||
| 128 | } elsif ($name eq 'domain:status') | ||||||||||||||||||||||||||||||||||
| 129 | { | ||||||||||||||||||||||||||||||||||
| 130 | 0 | $rinfo->{domain}->{$oname}->{application_status}=$c->firstChild->getData(); | |||||||||||||||||||||||||||||||||
| 131 | } elsif ($name=~m/^domain:(crDate|docsReceivedDate)$/) | ||||||||||||||||||||||||||||||||||
| 132 | { | ||||||||||||||||||||||||||||||||||
| 133 | 0 | $rinfo->{domain}->{$oname}->{$1}=$pd->parse_datetime($c->firstChild->getData()); | |||||||||||||||||||||||||||||||||
| 134 | } elsif ($name eq 'domain:registrant') | ||||||||||||||||||||||||||||||||||
| 135 | { | ||||||||||||||||||||||||||||||||||
| 136 | 0 | $cs->set($po->create_local_object('contact')->srid($c->firstChild->getData()),'registrant'); | |||||||||||||||||||||||||||||||||
| 137 | } elsif ($name eq 'domain:contact') | ||||||||||||||||||||||||||||||||||
| 138 | { | ||||||||||||||||||||||||||||||||||
| 139 | 0 | $cs->add($po->create_local_object('contact')->srid($c->firstChild->getData()),$c->getAttribute('type')); | |||||||||||||||||||||||||||||||||
| 140 | } elsif ($name eq 'domain:ns') | ||||||||||||||||||||||||||||||||||
| 141 | { | ||||||||||||||||||||||||||||||||||
| 142 | 0 | $rinfo->{domain}->{$oname}->{ns}=Net::DRI::Protocol::EPP::Util::parse_ns($po,$c); | |||||||||||||||||||||||||||||||||
| 143 | } elsif ($name eq 'domain:adr') | ||||||||||||||||||||||||||||||||||
| 144 | { | ||||||||||||||||||||||||||||||||||
| 145 | 0 | $rinfo->{domain}->{$oname}->{adr}=Net::DRI::Util::xml_parse_boolean($c->firstChild->getData()); | |||||||||||||||||||||||||||||||||
| 146 | } | ||||||||||||||||||||||||||||||||||
| 147 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||||||
| 149 | 0 | $rinfo->{domain}->{$oname}->{contact}=$cs; | |||||||||||||||||||||||||||||||||
| 150 | 0 | return; | |||||||||||||||||||||||||||||||||
| 151 | } | ||||||||||||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||||||||||
| 153 | ############ Transform commands | ||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||
| 155 | sub apply | ||||||||||||||||||||||||||||||||||
| 156 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
apply: not called CC=20 SCAR=60.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 157 | 0 | my ($epp,$domain,$rd)=@_; | |||||||||||||||||||||||||||||||||
| 158 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||
| 159 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'apply',$domain); | |||||||||||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('Apply action needs parameters') unless (defined($rd) && (ref($rd) eq 'HASH')); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $rd and ref $rd eq "HASH"
MC/DC0%0/2
defined $rd and ref $rd eq "HASH"
defined $rd
ref $rd eq "HASH"
Truth table0%0/3
A and B
A= defined $rdB= ref $rd eq "HASH"
| |||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | my @need=grep { !(exists($rd->{$_}) && $rd->{$_}) } qw/reference right prior-right-on-name prior-right-country documentaryevidence evidence-lang/; | ||||||||||||||||||||||||||||||||
|
Condition0%0/3
exists $rd->{$_} && $rd->{$_}
MC/DC0%0/2
exists $rd->{$_} && $rd->{$_}
exists $rd->{$_}
$rd->{$_}
Truth table0%0/3
A && B
A= exists $rd->{$_}B= $rd->{$_}
| |||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters('The following parameters are needed: '.join(' ',@need)) if @need; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('reference must be a xml normalizedstring from 1 to 100 characters long') unless Net::DRI::Util::xml_is_normalizedstring($rd->{reference},1,100); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 166 | 0 | push @d,['domain:reference',$rd->{reference}]; | |||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||
| 168 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('right must be PUBLICBODY, REG-TM-NAT, REG-TM-COM-INTL, GEO-DOO, COMP-ID, UNREG-TM, TITLES-ART, OTHER') unless ($rd->{right}=~m/^(?:PUBLICBODY|REG-TM-NAT|REG-TM-COM-INTL|GEO-DOO|COMP-ID|UNREG-TM|TITLES-ART|OTHER)/); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 169 | 0 | push @d,['domain:right',$rd->{right}]; | |||||||||||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||||||||||
| 171 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('prior-right-on-name must be a xml token from 1 to 255 characters long') unless Net::DRI::Util::xml_is_token($rd->{'prior-right-on-name'},1,255); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 172 | 0 | push @d,['domain:prior-right-on-name',$rd->{'prior-right-on-name'}]; | |||||||||||||||||||||||||||||||||
| 173 | |||||||||||||||||||||||||||||||||||
| 174 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('prior-right-country must be a CC of EU member') unless (length($rd->{'prior-right-country'})==2 && exists($Net::DRI::DRD::EURid::CCA2_EU{uc($rd->{'prior-right-country'})})); #### | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
length $rd->{"prior-right-country"} == 2 and exists $Net::DRI::DRD::EURid::CCA2_EU{uc $rd->{"prior-right-country"}}
MC/DC0%0/2
length $rd->{"prior-right-country"} == 2 and exists $Net::DRI::DRD::EURid::CCA2_EU{uc $rd->{"prior-right-country"}}
length $rd->{"prior-right-country"} == 2
exists $Net::DRI::DRD::EURid::CCA2_EU{uc $rd->{"prior-right-country"}}
Truth table0%0/3
A and B
A= length $rd->{"prior-right-country"} == 2B= exists $Net::DRI::DRD::EURid::CCA2_EU{uc $rd->{"prior-right-country"}}
| |||||||||||||||||||||||||||||||||||
| 175 | 0 | push @d,['domain:prior-right-country',uc($rd->{'prior-right-country'})]; | |||||||||||||||||||||||||||||||||
| 176 | |||||||||||||||||||||||||||||||||||
| 177 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('documentaryevidence must be applicant, registrar or thirdparty') unless $rd->{documentaryevidence}=~m/^(?:applicant|registrar|thirdparty)$/; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 178 | 0 | ▶ | if ($rd->{documentaryevidence} eq 'thirdparty') | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('documentaryevidence_email must be a valid email address') unless (defined($rd->{documentaryevidence_email}) && Email::Valid->rfc822($rd->{documentaryevidence_email})); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $rd->{"documentaryevidence_email"} and "Email::Valid"->rfc822($rd->{"documentaryevidence_email"})
MC/DC0%0/2
defined $rd->{"documentaryevidence_email"} and "Email::Valid"->rfc822($rd->{"documentaryevidence_email"})
defined $rd->{"documentaryevidence_email"}
"Email::Valid"->rfc822($rd->{"documentaryevidence_email"})
Truth table0%0/3
A and B
A= defined $rd->{"documentaryevidence_email"}B= "Email::Valid"->rfc822($rd->{"documentaryevidence_email"})
| |||||||||||||||||||||||||||||||||||
| 181 | 0 | push @d,['domain:documentaryevidence',['domain:thirdparty',$rd->{documentaryevidence_email}]]; | |||||||||||||||||||||||||||||||||
| 182 | } else | ||||||||||||||||||||||||||||||||||
| 183 | { | ||||||||||||||||||||||||||||||||||
| 184 | 0 | push @d,['domain:documentaryevidence',['domain:'.$rd->{documentaryevidence}]]; | |||||||||||||||||||||||||||||||||
| 185 | } | ||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||
| 187 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('evidence-lang must be a lang of EU member') unless (length($rd->{'evidence-lang'})==2 && exists($Net::DRI::DRD::EURid::LANGA2_EU{lc($rd->{'evidence-lang'})})); #### | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
length $rd->{"evidence-lang"} == 2 and exists $Net::DRI::DRD::EURid::LANGA2_EU{lc $rd->{"evidence-lang"}}
MC/DC0%0/2
length $rd->{"evidence-lang"} == 2 and exists $Net::DRI::DRD::EURid::LANGA2_EU{lc $rd->{"evidence-lang"}}
length $rd->{"evidence-lang"} == 2
exists $Net::DRI::DRD::EURid::LANGA2_EU{lc $rd->{"evidence-lang"}}
Truth table0%0/3
A and B
A= length $rd->{"evidence-lang"} == 2B= exists $Net::DRI::DRD::EURid::LANGA2_EU{lc $rd->{"evidence-lang"}}
| |||||||||||||||||||||||||||||||||||
| 188 | 0 | push @d,['domain:evidence-lang',lc($rd->{'evidence-lang'})]; | |||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||
| 190 | |||||||||||||||||||||||||||||||||||
| 191 | ## Nameservers, OPTIONAL | ||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_ns($epp,$rd->{ns},$domain,'domain') if Net::DRI::Util::has_ns($rd); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||
| 194 | ## Contacts, all OPTIONAL | ||||||||||||||||||||||||||||||||||
| 195 | 0 | ▶ | if (Net::DRI::Util::has_contact($rd)) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 196 | { | ||||||||||||||||||||||||||||||||||
| 197 | 0 | my $cs=$rd->{contact}; | |||||||||||||||||||||||||||||||||
| 198 | 0 | my @o=$cs->get('registrant'); | |||||||||||||||||||||||||||||||||
| 199 | 0 | ▶ | push @d,['domain:registrant',$o[0]->srid()] if (@o); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 200 | 0 | push @d,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cs); | |||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||
| 202 | |||||||||||||||||||||||||||||||||||
| 203 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||
| 204 | |||||||||||||||||||||||||||||||||||
| 205 | ## Nameserver groups | ||||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | if (exists($rd->{nsgroup})) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 207 | { | ||||||||||||||||||||||||||||||||||
| 208 | 0 | my @n=Net::DRI::Protocol::EPP::Extensions::EURid::Domain::add_nsgroup($rd->{nsgroup}); | |||||||||||||||||||||||||||||||||
| 209 | 0 | $epp->message()->command_extension('domain-ext', ['ext', ['apply', ['domain', @n]]]); | |||||||||||||||||||||||||||||||||
| 210 | } | ||||||||||||||||||||||||||||||||||
| 211 | 0 | return; | |||||||||||||||||||||||||||||||||
| 212 | } | ||||||||||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||||||||||
| 214 | sub apply_parse | ||||||||||||||||||||||||||||||||||
| 215 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||
|
Subroutine
apply_parse: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||
| 216 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||||||||||||||||||||||||||
| 217 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||||||||
| 218 | 0 | $rinfo->{_internal}->{must_reconnect}=1; ## All apply commands (successful or not) close the connection | |||||||||||||||||||||||||||||||||
| 219 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||||||||||
| 221 | 0 | my $credata=$mes->get_response('domain','appData'); | |||||||||||||||||||||||||||||||||
| 222 | 0 | ▶ | return unless $credata; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 223 | |||||||||||||||||||||||||||||||||||
| 224 | 0 | $rinfo->{domain}->{$oname}->{exist}=1; | |||||||||||||||||||||||||||||||||
| 225 | |||||||||||||||||||||||||||||||||||
| 226 | 0 | my $c=$credata->firstChild(); | |||||||||||||||||||||||||||||||||
| 227 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 228 | { | ||||||||||||||||||||||||||||||||||
| 229 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 230 | 0 | my $name=$c->nodeName(); | |||||||||||||||||||||||||||||||||
| 231 | 0 | ▶ | next unless $name; | ||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||||||||||
| 233 | 0 | ▶ | if ($name=~m/^domain:(name|reference|code)$/) | ||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||
| 234 | { | ||||||||||||||||||||||||||||||||||
| 235 | 0 | $rinfo->{domain}->{$oname}->{$1}=$c->firstChild->getData(); | |||||||||||||||||||||||||||||||||
| 236 | } elsif ($name=~m/^domain:(crDate)$/) | ||||||||||||||||||||||||||||||||||
| 237 | { | ||||||||||||||||||||||||||||||||||
| 238 | 0 | $rinfo->{domain}->{$oname}->{$1}=DateTime::Format::ISO8601->new()->parse_datetime($c->firstChild->getData()); | |||||||||||||||||||||||||||||||||
| 239 | } | ||||||||||||||||||||||||||||||||||
| 240 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||||||||||||||||
| 241 | 0 | return; | |||||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||
| 244 | #################################################################################################### | ||||||||||||||||||||||||||||||||||
| 245 | 1 | 1; | |||||||||||||||||||||||||||||||||