| 1 | ## Domain Registry Interface, .PL Domain EPP extension commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | ## Copyright (c) 2006,2008-2011,2013,2016 Patrick Mevzek <netdri@dotandco.com> and Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | ## 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::PL::Domain; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 1 | ▶ | use feature 'state'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use Net::DRI::Exception; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use Net::DRI::Data::Hosts; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | ▶ | use Net::DRI::Protocol::EPP::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | Net::DRI::Protocol::EPP::Extensions::PL::Domain - .PL EPP Domain extension commands for Net::DRI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | Please see the README file for details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | =head1 AUTHORS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | Tonnerre Lombard <tonnerre.lombard@sygroup.ch> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | Copyright (c) 2006,2008-2011,2013,2016 Patrick Mevzek <netdri@dotandco.com> and Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | sub register_commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | my ($class,$version)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | state $cmds = { 'domain' => { create => [ \&create ], | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | update => [ \&update ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | info => [ undef, \&info_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | 0 | return $cmds; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | sub build_ns | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | 0 | ▶ | my ($epp,$ns,$domain,$xmlns)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_ns: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | ▶ | $xmlns='domain' unless defined($xmlns); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | return map { [$xmlns . ':ns',$_] } $ns->get_names(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | sub create | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | my ($epp,$domain,$rd)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: not called CC=21 SCAR=61.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'create',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | my $def = $epp->default_parameters(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | 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"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | while(my ($k,$v)=each(%{$def->{domain_create}})) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | next if exists($rd->{$k}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | 0 | $rd->{$k}=$v | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | ## Period, OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | 0 | ▶ | push @d,Net::DRI::Protocol::EPP::Util::build_period($rd->{duration}) if Net::DRI::Util::has_duration($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | ## Nameservers, OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | push @d,build_ns($epp,$rd->{ns},$domain) if Net::DRI::Util::has_ns($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | ## Contacts, all OPTIONAL | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | 0 | ▶ | if (Net::DRI::Util::has_contact($rd)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 0 | my $cs=$rd->{contact}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | 0 | my @o=$cs->get('registrant'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | push @d,['domain:registrant',$o[0]->srid()] if (@o); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | 0 | push @d,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cs); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | ## AuthInfo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | ▶ | Net::DRI::Exception::usererr_insufficient_parameters("authInfo is mandatory") unless (Net::DRI::Util::has_auth($rd)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 0 | push @d,Net::DRI::Protocol::EPP::Util::domain_build_authinfo($epp,$rd->{auth}); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | return unless exists($rd->{reason}) || exists($rd->{book}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
exists $rd->{"reason"} or exists $rd->{"book"}
MC/DC0%0/2
exists $rd->{"reason"} or exists $rd->{"book"}
exists $rd->{"reason"}
exists $rd->{"book"}
Truth table0%0/3
A or B
A= exists $rd->{"reason"}B= exists $rd->{"book"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | my $eid=$mes->command_extension_register('extdom', 'create'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | 0 | my @e; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | push @e,['extdom:reason',$rd->{reason}] if (exists($rd->{reason}) && $rd->{reason}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
exists $rd->{"reason"} and $rd->{"reason"}
MC/DC0%0/2
exists $rd->{"reason"} and $rd->{"reason"}
exists $rd->{"reason"}
$rd->{"reason"}
Truth table0%0/3
A and B
A= exists $rd->{"reason"}B= $rd->{"reason"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | 0 | ▶ | push @e,['extdom:book'] if (exists($rd->{book}) && $rd->{book}); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
exists $rd->{"book"} and $rd->{"book"}
MC/DC0%0/2
exists $rd->{"book"} and $rd->{"book"}
exists $rd->{"book"}
$rd->{"book"}
Truth table0%0/3
A and B
A= exists $rd->{"book"}B= $rd->{"book"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | 0 | $mes->command_extension($eid,\@e); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | sub update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | 0 | ▶ | my ($epp,$domain,$todo)=@_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update: not called CC=17 SCAR=57.2
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters($todo.' must be a Net::DRI::Data::Changes object') unless Net::DRI::Util::isa_changes($todo); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | my @d=Net::DRI::Protocol::EPP::Util::domain_build_command($mes,'update',$domain); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | 0 | my $nsadd=$todo->add('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | my $nsdel=$todo->del('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | 0 | my $sadd=$todo->add('status'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | my $sdel=$todo->del('status'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | 0 | my $cadd=$todo->add('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | 0 | my $cdel=$todo->del('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | 0 | my (@add,@del); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | 0 | ▶ | push @add,build_ns($epp,$nsadd,$domain) if $nsadd && !$nsadd->is_empty(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$nsadd and not $nsadd->is_empty
MC/DC0%0/2
$nsadd and not $nsadd->is_empty
$nsadd
not $nsadd->is_empty
Truth table0%0/3
A and not(B)
A= $nsaddB= not $nsadd->is_empty
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | 0 | ▶ | push @add,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cadd) if $cadd; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | 0 | ▶ | push @add,$sadd->build_xml('domain:status','core') if $sadd; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | push @del,build_ns($epp,$nsdel,$domain,undef,1) if $nsdel && !$nsdel->is_empty(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$nsdel and not $nsdel->is_empty
MC/DC0%0/2
$nsdel and not $nsdel->is_empty
$nsdel
not $nsdel->is_empty
Truth table0%0/3
A and not(B)
A= $nsdelB= not $nsdel->is_empty
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | ▶ | push @del,Net::DRI::Protocol::EPP::Util::build_core_contacts($epp,$cdel) if $cdel; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | push @del,$sdel->build_xml('domain:status','core') if $sdel; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | 0 | ▶ | push @d,['domain:add',@add] if @add; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | ▶ | push @d,['domain:rem',@del] if @del; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | my $chg=$todo->set('registrant'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | 0 | my @chg; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | 0 | ▶ | push @chg,['domain:registrant',$chg->srid()] if Net::DRI::Util::isa_contact($chg,'Net::DRI::Data::Contact::PL'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | 0 | $chg=$todo->set('auth'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 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"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | 0 | ▶ | push @d,['domain:chg',@chg] if @chg; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | sub info_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | 0 | ▶ | my ($po, $otype, $oaction, $oname, $rinfo) = @_; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=9 SCAR=45.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | 0 | my $mes = $po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | my $infdata = $mes->get_response('domain','infData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | ▶ | return unless $infdata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | my $ns = Net::DRI::Data::Hosts->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | my $c = $infdata->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | 0 | ▶ | my $name = $c->localname() || $c->nodeName(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Condition0%0/3
$c->localname || $c->nodeName
MC/DC0%0/2
$c->localname || $c->nodeName
$c->localname
$c->nodeName
Truth table0%0/3
A || B
A= $c->localnameB= $c->nodeName
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | 0 | ▶ | next unless $name; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | ▶ | if ($name eq 'name') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | $oname = lc($c->getFirstChild()->getData()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | elsif ($name eq 'ns') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | 0 | $ns->add($c->getFirstChild()->getData()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | 0 | } continue { $c = $c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | $rinfo->{domain}->{$oname}->{ns} = $ns; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||