| 1 | ## Domain Registry Interface, EPP Extension for .travel UIN | ||||||||||||||||||||||||||||
| 2 | ## (ICANN Sponsored TLD Registry Agreement, Part IV) | ||||||||||||||||||||||||||||
| 3 | ## | ||||||||||||||||||||||||||||
| 4 | ## Copyright (c) 2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||
| 5 | ## All rights reserved. | ||||||||||||||||||||||||||||
| 6 | ## Copyright (c) 2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||||||||||||||||||||
| 7 | ## | ||||||||||||||||||||||||||||
| 8 | ## This file is part of Net::DRI | ||||||||||||||||||||||||||||
| 9 | ## | ||||||||||||||||||||||||||||
| 10 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||
| 11 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||
| 12 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||
| 13 | ## (at your option) any later version. | ||||||||||||||||||||||||||||
| 14 | ## | ||||||||||||||||||||||||||||
| 15 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||
| 16 | #################################################################################################### | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | package Net::DRI::Protocol::EPP::Extensions::NeuLevel::UIN; | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 21 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 22 | 1 | ▶ | use feature 'state'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | =pod | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | =head1 NAME | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | Net::DRI::Protocol::EPP::Extensions::NeuLevel::UIN - EPP Extension for .TRAVEL UIN for Net::DRI | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | Please see the README file for details. | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | =head1 SUPPORT | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | E<lt>tonnerre.lombard@sygroup.chE<gt> | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | E<lt>http://oss.bsdprojects.net/projects/netdri/E<gt> | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt> | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||
| 53 | |||||||||||||||||||||||||||||
| 54 | Copyright (c) 2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||||||||||||||||||||
| 55 | Copyright (c) 2016,2018-2019 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||
| 56 | All rights reserved. | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||
| 59 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||
| 60 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||
| 61 | (at your option) any later version. | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||
| 65 | =cut | ||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||
| 68 | #################################################################################################### | ||||||||||||||||||||||||||||
| 69 | |||||||||||||||||||||||||||||
| 70 | sub register_commands | ||||||||||||||||||||||||||||
| 71 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 72 | 0 | my ($class, $version) = @_; | |||||||||||||||||||||||||||
| 73 | 0 | state $domain = { | |||||||||||||||||||||||||||
| 74 | create => [ \&add_uin, undef ], | ||||||||||||||||||||||||||||
| 75 | transfer_request => [ \&add_uin, undef ], | ||||||||||||||||||||||||||||
| 76 | renew => [ \&renew, undef ], | ||||||||||||||||||||||||||||
| 77 | }; | ||||||||||||||||||||||||||||
| 78 | 0 | state $commands = { domain => $domain }; | |||||||||||||||||||||||||||
| 79 | 0 | return $commands; | |||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | sub setup | ||||||||||||||||||||||||||||
| 83 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 84 | 0 | my ($class,$po,$version)=@_; | |||||||||||||||||||||||||||
| 85 | 0 | $po->ns({ 'neulevel' => 'urn:ietf:params:xml:ns:neulevel-1.0' }); | |||||||||||||||||||||||||||
| 86 | 0 | return; | |||||||||||||||||||||||||||
| 87 | } | ||||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | #################################################################################################### | ||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | ############ Transform commands | ||||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||||
| 93 | sub add_uin | ||||||||||||||||||||||||||||
| 94 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
add_uin: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 95 | 0 | my ($epp, $domain, $rd) = @_; | |||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 0 | ▶ | return unless Net::DRI::Util::has_key($rd,'uin'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | 0 | $epp->message()->command_extension('neulevel', ['extension', ['unspec', 'UIN=' . $rd->{uin}]]); | |||||||||||||||||||||||||||
| 100 | 0 | return; | |||||||||||||||||||||||||||
| 101 | } | ||||||||||||||||||||||||||||
| 102 | |||||||||||||||||||||||||||||
| 103 | sub renew | ||||||||||||||||||||||||||||
| 104 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
renew: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 105 | 0 | my ($epp, $domain, $rd) = @_; | |||||||||||||||||||||||||||
| 106 | 0 | my @vals = qw(RestoreReasonCode RestoreComment TrueData ValidUse UIN); | |||||||||||||||||||||||||||
| 107 | 0 | my %info; | |||||||||||||||||||||||||||
| 108 | my $comment; | ||||||||||||||||||||||||||||
| 109 | |||||||||||||||||||||||||||||
| 110 | 0 | ▶ | if (defined($rd->{rgp}) && ref($rd->{rgp}) eq 'HASH') | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $rd->{"rgp"} and ref $rd->{"rgp"} eq "HASH"
MC/DC0%0/2
defined $rd->{"rgp"} and ref $rd->{"rgp"} eq "HASH"
defined $rd->{"rgp"}
ref $rd->{"rgp"} eq "HASH"
Truth table0%0/3
A and B
A= defined $rd->{"rgp"}B= ref $rd->{"rgp"} eq "HASH"
| |||||||||||||||||||||||||||||
| 111 | { | ||||||||||||||||||||||||||||
| 112 | 0 | $info{TrueData} = 'Y'; | |||||||||||||||||||||||||||
| 113 | 0 | $info{ValidUse} = 'Y'; | |||||||||||||||||||||||||||
| 114 | 0 | $info{RestoreReasonCode} = $rd->{rgp}->{code}; | |||||||||||||||||||||||||||
| 115 | 0 | $comment = $rd->{rgp}->{comment}; | |||||||||||||||||||||||||||
| 116 | 0 | $comment = join('', map { ucfirst($_) } split(/\s+/, $comment)); | |||||||||||||||||||||||||||
| 117 | 0 | $info{RestoreComment} = $comment; | |||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||
| 120 | 0 | ▶ | if (Net::DRI::Util::has_key($rd,'uin')) | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 121 | { | ||||||||||||||||||||||||||||
| 122 | 0 | $info{UIN} = $rd->{uin}; | |||||||||||||||||||||||||||
| 123 | } | ||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 0 | $epp->message()->command_extension('neulevel', ['extension', ['unspec', join(' ', map { $_ . '=' . $info{$_} } grep { defined($info{$_}) } @vals)]]); | |||||||||||||||||||||||||||
| 126 | 0 | return; | |||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | #################################################################################################### | ||||||||||||||||||||||||||||
| 130 | 1 | 1; | |||||||||||||||||||||||||||