« DRI/Protocol/EPP/Extensions/VeriSign/NameStore.pm
↑ Summary
DRI/Protocol/EPP/Extensions/SIDN/Host.pm »
| 1 | ## Domain Registry Interface, NIC.AT Contact extension | ||||||||||||||||||||||||||||
| 2 | ## Contributed by Michael Braunoeder from NIC.AT <mib@nic.at> | ||||||||||||||||||||||||||||
| 3 | ## | ||||||||||||||||||||||||||||
| 4 | ## Copyright (c) 2006-2008,2010,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::AT::Contact; | ||||||||||||||||||||||||||||
| 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 | =pod | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | =head1 NAME | ||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||
| 26 | Net::DRI::Protocol::EPP::Extensions::AT::Contact - NIC.AT Contact Extensions for Net::DRI | ||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||
| 28 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | Please see the README file for details. | ||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | =head1 SUPPORT | ||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||
| 34 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||
| 42 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | Copyright (c) 2006-2008,2010,2013,2016,2018,2019 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||
| 51 | All rights reserved. | ||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||
| 54 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||
| 55 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||
| 56 | (at your option) any later version. | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | =cut | ||||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | #################################################################################################### | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | sub register_commands | ||||||||||||||||||||||||||||
| 65 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 66 | 0 | my ($class,$version)=@_; | |||||||||||||||||||||||||||
| 67 | 0 | state $contact = { | |||||||||||||||||||||||||||
| 68 | info => [ undef, \&parse_info ], | ||||||||||||||||||||||||||||
| 69 | update => [ \&update, undef ], | ||||||||||||||||||||||||||||
| 70 | create => [ \&create, undef ], | ||||||||||||||||||||||||||||
| 71 | }; | ||||||||||||||||||||||||||||
| 72 | 0 | state $commands = { 'contact' => $contact }; | |||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 0 | return $commands; | |||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||||
| 77 | sub setup | ||||||||||||||||||||||||||||
| 78 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 79 | 0 | my ($class,$po,$version)=@_; | |||||||||||||||||||||||||||
| 80 | 0 | $po->ns({ 'at-ext-contact' => 'http://www.nic.at/xsd/at-ext-contact-1.0' }); | |||||||||||||||||||||||||||
| 81 | 0 | return; | |||||||||||||||||||||||||||
| 82 | } | ||||||||||||||||||||||||||||
| 83 | |||||||||||||||||||||||||||||
| 84 | sub parse_info | ||||||||||||||||||||||||||||
| 85 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
parse_info: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||||||||||||
| 86 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||||||||||||||||||||
| 87 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||
| 88 | |||||||||||||||||||||||||||||
| 89 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 90 | |||||||||||||||||||||||||||||
| 91 | 0 | my $c=$rinfo->{contact}->{$oname}->{self}; | |||||||||||||||||||||||||||
| 92 | 0 | ▶ | $c->email(undef) if ($c->email() eq 'n/a'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 0 | my $condata=$mes->get_extension('at-ext-contact', 'infData'); | |||||||||||||||||||||||||||
| 95 | 0 | ▶ | return unless $condata; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 0 | my @options; | |||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||
| 99 | 0 | my $el=$condata->getElementsByTagNameNS($mes->ns('at-ext-contact'), 'type'); | |||||||||||||||||||||||||||
| 100 | 0 | ▶ | my $type=$el? $el->get_node(1)->getFirstChild()->getData() : undef; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 0 | ▶ | $c->type($type) if (defined($type) && $type); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
defined $type and $type
MC/DC0%0/2
defined $type and $type
defined $type
$type
Truth table0%0/3
A and B
A= defined $typeB= $type
| |||||||||||||||||||||||||||||
| 103 | # $rinfo->{contact}->{$oname}->{type}=$type if $type; | ||||||||||||||||||||||||||||
| 104 | 0 | return; | |||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | sub create | ||||||||||||||||||||||||||||
| 108 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
create: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 109 | 0 | my ($epp,$contact,$rd)=@_; | |||||||||||||||||||||||||||
| 110 | |||||||||||||||||||||||||||||
| 111 | 0 | my $type=$contact->type(); | |||||||||||||||||||||||||||
| 112 | 0 | ▶ | return unless defined $type; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||||
| 114 | 0 | $epp->message()->command_extension('at-ext-contact', ['create', ['type', $type]]); | |||||||||||||||||||||||||||
| 115 | 0 | return; | |||||||||||||||||||||||||||
| 116 | } | ||||||||||||||||||||||||||||
| 117 | |||||||||||||||||||||||||||||
| 118 | sub update | ||||||||||||||||||||||||||||
| 119 | 0 | ▶ | { | ||||||||||||||||||||||||||
|
Subroutine
update: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 120 | 0 | my ($epp,$contact,$todo)=@_; | |||||||||||||||||||||||||||
| 121 | |||||||||||||||||||||||||||||
| 122 | 0 | my $type=$todo->set('info')->type(); | |||||||||||||||||||||||||||
| 123 | 0 | ▶ | return unless defined $type; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 124 | |||||||||||||||||||||||||||||
| 125 | 0 | $epp->message()->command_extension('at-ext-contact', ['update', ['chg', ['type', $type]]]); | |||||||||||||||||||||||||||
| 126 | 0 | return; | |||||||||||||||||||||||||||
| 127 | } | ||||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||||
| 129 | #################################################################################################### | ||||||||||||||||||||||||||||
| 130 | 1 | 1; | |||||||||||||||||||||||||||