« DRI/Protocol/EPP/Extensions/BR/Domain.pm
↑ Summary
DRI/Protocol/EPP/Extensions/UnitedTLD/Charge.pm »
| 1 | ## Domain Registry Interface, .CZ EPP NSSET extension commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | ## Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | ## (c) 2010,2013,2018 Patrick Mevzek <netdri@dotandco.com> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | ## All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | ## This file is part of Net::DRI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | ## (at your option) any later version. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | ## | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | package Net::DRI::Protocol::EPP::Extensions::CZ::NSSET; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use feature 'state'; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use Net::DRI::Exception; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | 1 | ▶ | use Net::DRI::Data::Hosts; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | 1 | ▶ | use Net::DRI::Data::ContactSet; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | 1 | ▶ | use Net::DRI::Protocol::EPP::Util; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | =head1 NAME | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | Net::DRI::Protocol::EPP::Extensions::CZ::NSSET - .CZ NSSET extension commands for Net::DRI | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | Please see the README file for details. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | =head1 SUPPORT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | E<lt>development@sygroup.chE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | =head1 SEE ALSO | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | E<lt>http://oss.bsdprojects.net/projects/netdri/E<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | =head1 AUTHOR | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | (c) 2010,2013,2018 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 %tmp1 = ( | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | create => [ \&create ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | check => [ \&check, \&check_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | info => [ \&info, \&info_parse ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | delete => [ \&delete ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | update => [ \&update ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | transfer_query => [ \&transfer_query ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | transfer_request => [ \&transfer_request ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | transfer_cancel => [ \&transfer_cancel ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | transfer_answer => [ \&transfer_answer ], | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | ); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | $tmp1{check_multi} = $tmp1{check}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | 0 | return { 'nsset' => \%tmp1 }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 92 | sub setup | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 93 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 94 | 0 | my ($class,$po,$version)=@_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 95 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 96 | 0 | state $ns = { 'nsset' => 'http://www.nic.cz/xml/epp/nsset-1.2' }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 97 | 0 | $po->ns($ns); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 98 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 99 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 101 | sub build_command | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 102 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_command: not called CC=10 SCAR=47.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 103 | 0 | my ($epp, $msg, $command, $hosts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 104 | 0 | ▶ | my $tcommand = (ref($command) eq 'ARRAY' ? $command->[0] : $command); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 105 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 106 | 0 | my @gn; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 108 | 0 | ▶ | foreach my $h (grep { defined } (ref($hosts) eq 'ARRAY') ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 109 | @$hosts : ($hosts)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 110 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 111 | 0 | ▶ | my $gn = Net::DRI::Util::isa_nsgroup($h) ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 112 | $h->name() : $h; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 113 | 0 | ▶ | Net::DRI::Exception->die(1, 'protocol/EPP', 10, | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/9
defined $gn and $gn and not ref $gn and Net::DRI::Util::xml_is_normalizedstring($gn, 1, 100)
defined $gn and $gn and not ref $gn
defined $gn and $gn
MC/DC0%0/4
defined $gn and $gn and not ref $gn and Net::DRI::Util::xml_is_normalizedstring($gn, 1, 100)
defined $gn
$gn
not ref $gn
Net::DRI::Util::xml_is_normalizedstring($gn, 1, 100)
Truth table0%0/5
A and B and not(C) and D
A= defined $gnB= $gnC= not ref $gnD= Net::DRI::Util::xml_is_normalizedstring($gn, 1, 100)
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 114 | 'Invalid NSgroup name: ' . $gn) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 115 | unless (defined($gn) && $gn && !ref($gn) && Net::DRI::Util::xml_is_normalizedstring( | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 116 | $gn, 1, 100)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 117 | 0 | push(@gn, $gn); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 120 | 0 | ▶ | Net::DRI::Exception->die(1, 'protocol/EPP', 2, 'NSgroup name needed') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 121 | unless @gn; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 123 | 0 | $msg->command([$command, 'nsset:' . $tcommand, $msg->nsattrs('nsset')]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 125 | 0 | return map { ['nsset:id', $_] } @gn; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 127 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | sub add_nsname | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 129 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
add_nsname: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 130 | 0 | my ($ns) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 131 | 0 | ▶ | return () unless (defined($ns)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 132 | 0 | my @a; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 133 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 134 | 0 | ▶ | if (!ref($ns)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 135 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 136 | 0 | return ['nsset:ns', ['nsset:name', $ns]]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 137 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 138 | elsif (ref($ns) eq 'ARRAY') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 139 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 140 | 0 | return ['nsset:ns', map { ['nsset:name', $_] } @$ns]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 142 | elsif (Net::DRI::Util::isa_hosts($ns)) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 143 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 144 | 0 | ▶ | for (my $i = 1; $i <= $ns->count(); $i++) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 145 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 146 | 0 | my ($name, $v4, $v6) = $ns->get_details($i); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 147 | 0 | my @b; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 148 | 0 | push(@b, ['nsset:name', $name]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 149 | 0 | foreach my $addr (@{$v4}, @{$v6}) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 150 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 151 | 0 | push(@b, ['nsset:addr', $addr]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 152 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 153 | 0 | push(@a, ['nsset:ns', @b]); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 155 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 157 | 0 | return @a; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 158 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 159 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 160 | sub build_contacts | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 161 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_contacts: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 162 | 0 | my ($cs) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 163 | 0 | ▶ | return () unless (defined($cs)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 164 | 0 | my @a; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 166 | 0 | foreach my $type ($cs->types()) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 167 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 168 | 0 | push(@a, map { ['nsset:' . $type, $_->srid()] } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 169 | $cs->get($type)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 170 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 171 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 172 | 0 | return @a; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 173 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 175 | sub build_authinfo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 176 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_authinfo: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 177 | 0 | my $rauth = shift; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 178 | 0 | ▶ | return unless (defined($rauth) && ref($rauth) eq 'HASH'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $rauth and ref $rauth eq "HASH"
MC/DC0%0/2
defined $rauth and ref $rauth eq "HASH"
defined $rauth
ref $rauth eq "HASH"
Truth table0%0/3
A and B
A= defined $rauthB= ref $rauth eq "HASH"
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 179 | 0 | return ['nsset:authInfo', $rauth->{pw}]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 181 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 182 | sub build_reportlevel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 183 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
build_reportlevel: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 184 | 0 | my $level = int(shift); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 185 | 0 | ▶ | return unless (defined($level) && $level >= 0 && $level <= 10); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/6
defined $level and $level >= 0 and $level <= 10
defined $level and $level >= 0
MC/DC0%0/3
defined $level and $level >= 0 and $level <= 10
defined $level
$level >= 0
$level <= 10
Truth table0%0/4
A and B and C
A= defined $levelB= $level >= 0C= $level <= 10
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 186 | 0 | return ['nsset:reportlevel', $level]; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 187 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 188 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 189 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 190 | ########### Query commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 192 | sub check | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 193 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 194 | 0 | my ($epp, @hosts)=@_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 195 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 196 | 0 | my @d = build_command($epp, $mes, 'check', \@hosts); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 197 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 198 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 199 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 200 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 202 | sub check_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 203 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
check_parse: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 204 | 0 | my ($po, $otype, $oaction, $oname, $rinfo) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 205 | 0 | my $mes = $po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 206 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 207 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 208 | 0 | my $chkdata = $mes->get_response('nsset', 'chkData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 209 | 0 | ▶ | return unless $chkdata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 210 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 211 | 0 | foreach my $cd ($chkdata->getElementsByTagNameNS($mes->ns('nsset'), 'cd')) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 212 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 213 | 0 | my $c = $cd->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 214 | 0 | my $nsset; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 215 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 216 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 217 | ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 218 | 0 | ▶ | next unless ($c->nodeType() == 1); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 219 | 0 | ▶ | my $n = $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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 220 | 0 | ▶ | if ($n eq 'id') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 221 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 222 | 0 | $nsset = $c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 223 | $rinfo->{nsset}->{$nsset}->{exist} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 224 | 0 | 1 - Net::DRI::Util::xml_parse_boolean | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 225 | ($c->getAttribute('avail')); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 226 | $rinfo->{nsset}->{$nsset}->{action} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 227 | 0 | 'check'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 228 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 229 | 0 | } continue { $c = $c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 230 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 231 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 232 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 233 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 234 | sub info | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 235 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 236 | 0 | my ($epp, $hosts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 237 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 238 | 0 | my @d = build_command($epp, $mes, 'info', $hosts); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 239 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 240 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 241 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 242 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 243 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 244 | sub info_parse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 245 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=19 SCAR=59.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 246 | 0 | my ($po, $otype, $oaction, $oname, $rinfo) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 247 | 0 | my $mes = $po->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 248 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 249 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 250 | 0 | my $infdata = $mes->get_response('nsset','infData'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 251 | 0 | ▶ | return unless $infdata; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 253 | 0 | my $ns = Net::DRI::Data::Hosts->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 254 | 0 | my $cs = Net::DRI::Data::ContactSet->new(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 255 | 0 | my @s; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 256 | 0 | my $c = $infdata->getFirstChild(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 257 | 0 | ▶ | while ($c) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 258 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 259 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 260 | 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 261 | 0 | ▶ | next unless $name; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 262 | 0 | ▶ | if ($name eq 'id') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 9 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 263 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 264 | 0 | $oname = $c->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 265 | $rinfo->{nsset}->{$oname}->{name} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 266 | 0 | $rinfo->{nsset}->{$oname}->{id} = $oname; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 267 | 0 | $rinfo->{nsset}->{$oname}->{exist} = 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 268 | 0 | $rinfo->{nsset}->{$oname}->{action} = 'info'; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 269 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 270 | elsif ($name eq 'roid') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 271 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 272 | 0 | $rinfo->{nsset}->{$oname}->{roid} = $c->getFirstChild() | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 273 | ->getData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 274 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 275 | elsif ($name eq 'reportlevel') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 276 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 277 | $rinfo->{nsset}->{$oname}->{reportlevel} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 278 | 0 | int($c->getFirstChild()->getData()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 279 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 280 | elsif ($name eq 'status') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 281 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 282 | 0 | push(@s,Net::DRI::Protocol::EPP::Util::parse_node_status($c)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 283 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 284 | elsif ($name eq 'authInfo') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 285 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 286 | $rinfo->{nsset}->{$oname}->{auth} = | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 287 | 0 | { pw => $c->getFirstChild()->getData() }; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 288 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 289 | elsif ($name =~ /^((?:c[lr]|tr|up)ID)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 290 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 291 | 0 | $rinfo->{nsset}->{$oname}->{$1} = | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 292 | $c->getFirstChild()->getData(); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 294 | elsif ($name =~ /^((?:c[lr]|tr|up)Date)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 295 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 296 | 0 | $rinfo->{nsset}->{$oname}->{$1} = $po->parse_iso8601($c->textContent()); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 297 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 298 | elsif ($name eq 'ns') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 299 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 300 | 0 | my $hostname; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 301 | my @v4; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 302 | 0 | my @v6; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 303 | 0 | foreach my $xname ($c->getElementsByTagNameNS($mes->ns('nsset'), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 304 | 'name')) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 305 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 306 | 0 | $hostname = $xname->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 307 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 308 | 0 | foreach my $xaddr ($c->getElementsByTagNameNS($mes->ns('nsset'), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 309 | 'addr')) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 310 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 311 | 0 | my $xa = $xaddr->getFirstChild()->getData(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 312 | 0 | ▶ | if ($xa =~ /^\d+\.\d+\.\d+\.\d+$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 313 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 314 | 0 | push(@v4, $xa); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 315 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 316 | else | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 317 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 318 | 0 | push(@v6, $xa); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 319 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 320 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 321 | 0 | $ns->add($hostname, \@v4, \@v6); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 322 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 323 | elsif ($name =~ /^(registrant|billing|admin|tech)$/) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 324 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 325 | 0 | $cs->add($po->create_local_object('contact')->srid($c->getFirstChild()->getData()), | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 326 | $name); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 327 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 328 | 0 | } continue { $c = $c->getNextSibling(); } | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 330 | 0 | $rinfo->{nsset}->{$oname}->{self} = $ns; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 331 | 0 | $rinfo->{nsset}->{$oname}->{contact} = $cs; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 332 | 0 | $rinfo->{nsset}->{$oname}->{status} = $po->create_local_object('status')->add(@s); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 333 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 334 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 335 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 336 | sub transfer_query | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 337 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_query: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 338 | 0 | my ($epp, $name, $rd) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 339 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 340 | 0 | my @d = build_command($epp, $mes, ['transfer', {'op' => 'query'}], | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 341 | $name); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 342 | 0 | ▶ | push(@d, build_authinfo($rd->{auth})) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 343 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 344 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 345 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 347 | ############ Transform commands | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 348 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 349 | sub create | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 350 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 351 | 0 | my ($epp, $name, $rd) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 352 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 353 | 0 | my @d = build_command($epp, $mes, 'create', $name); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 354 | 0 | my $hosts = $rd->{ns}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 355 | 0 | my $cs = $rd->{contact}; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 356 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 357 | 0 | push(@d, add_nsname($hosts)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 358 | 0 | push(@d, build_contacts($cs)); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 359 | 0 | push(@d, build_authinfo($rd->{auth})); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 360 | 0 | push(@d, build_reportlevel($rd->{reportlevel})); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 361 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 362 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 363 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 364 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 365 | sub delete ## no critic (Subroutines::ProhibitBuiltinHomonyms) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 366 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
delete: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 367 | 0 | my ($epp, $hosts) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 368 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 369 | 0 | my @d = build_command($epp, $mes, 'delete', $hosts); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 370 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 371 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 372 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 373 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 374 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 375 | sub transfer_request | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 376 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_request: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 377 | 0 | my ($epp, $name, $rd) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 378 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 379 | 0 | my @d = build_command($epp, $mes, ['transfer', {'op' => 'request'}], | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 380 | $name); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 381 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 382 | 0 | ▶ | push(@d, build_authinfo($rd->{auth})) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 383 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 384 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 385 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 387 | sub transfer_answer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 388 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_answer: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 389 | 0 | my ($epp, $name, $rd) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 390 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 391 | my @d = build_command($epp, $mes, ['transfer', | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 392 | {'op' => (Net::DRI::Util::has_key($rd, 'approve') && $rd->{approve} ? | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 393 | 0 | ▶ | 'approve' : 'reject')}], $name); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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"}
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 394 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 395 | 0 | ▶ | push(@d, build_authinfo($rd->{auth})) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 396 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 397 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 398 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 399 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 400 | sub transfer_cancel | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 401 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
transfer_cancel: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 402 | 0 | my ($epp, $name, $rd) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 403 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 404 | 0 | my @d = build_command($epp, $mes, ['transfer', {'op' => 'cancel'}], | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 405 | $name); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 406 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 407 | 0 | ▶ | push(@d, build_authinfo($rd->{auth})) if Net::DRI::Util::has_auth($rd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 408 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 409 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 410 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 411 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 412 | sub update | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 413 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
update: not called CC=15 SCAR=54.8
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 414 | 0 | my ($epp, $hosts, $todo) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 415 | 0 | my $mes = $epp->message(); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 416 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 417 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters($todo . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 418 | ' must be a Net::DRI::Data::Changes object') | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 419 | unless Net::DRI::Util::isa_changes($todo); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 420 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 421 | 0 | ▶ | if ((grep { ! /^(?:ns|contact|auth|reportlevel)$/ } $todo->types())) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 422 | { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 423 | 0 | Net::DRI::Exception->die(0, 'protocol/EPP', 11, | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 424 | 'Only ns/contact add/del and auth/reportlevel set ' . | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 425 | 'available for nsset'); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 426 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 427 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 428 | 0 | my @d = build_command($epp, $mes, 'update', $hosts); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 429 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 430 | 0 | my $nsadd = $todo->add('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 431 | 0 | my $nsdel = $todo->del('ns'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 432 | 0 | my $cadd = $todo->add('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 433 | 0 | my $cdel = $todo->del('contact'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 434 | 0 | my $auth = $todo->set('auth'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 435 | 0 | my $level = $todo->set('reportlevel'); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 436 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 437 | 0 | my (@add, @del, @set); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 438 | 0 | ▶ | push(@add, add_nsname($nsadd)) 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 439 | 0 | ▶ | push(@add, build_contacts($cadd)) if ($cadd); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 440 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 441 | 0 | ▶ | push(@del, map { ['nsset:name', $_] } $nsdel->get_names()) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
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
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 442 | if ($nsdel && !$nsdel->is_empty()); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 443 | 0 | ▶ | push(@del, build_contacts($cdel)) if ($cdel); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 444 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 445 | 0 | ▶ | push(@set, ['nsset:authInfo', $auth->{pw}]) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $auth and Net::DRI::Util::has_key($auth, "pw")
MC/DC0%0/2
defined $auth and Net::DRI::Util::has_key($auth, "pw")
defined $auth
Net::DRI::Util::has_key($auth, "pw")
Truth table0%0/3
A and B
A= defined $authB= Net::DRI::Util::has_key($auth, "pw")
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 446 | if (defined($auth) && Net::DRI::Util::has_key($auth, 'pw')); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 447 | 0 | ▶ | push(@set, build_reportlevel($level)) if (defined($level)); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 448 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 449 | 0 | ▶ | push(@d, ['nsset:add', @add]) if (@add); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 450 | 0 | ▶ | push(@d, ['nsset:rem', @del]) if (@del); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 451 | 0 | ▶ | push(@d, ['nsset:chg', @set]) if (@set); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 452 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 453 | 0 | $mes->command_body(\@d); | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 454 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 455 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 456 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 457 | #################################################################################################### | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 458 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||