| 1 | ## Domain Registry Interface, ARNES (.SI) Contact EPP extension commands | ||||||||||||||||||||||||||||
| 2 | ## | ||||||||||||||||||||||||||||
| 3 | ## Copyright (c) 2008,2013,2016 Patrick Mevzek <netdri@dotandco.com>. All rights reserved. | ||||||||||||||||||||||||||||
| 4 | ## | ||||||||||||||||||||||||||||
| 5 | ## This file is part of Net::DRI | ||||||||||||||||||||||||||||
| 6 | ## | ||||||||||||||||||||||||||||
| 7 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||
| 8 | ## it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||
| 9 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||
| 10 | ## (at your option) any later version. | ||||||||||||||||||||||||||||
| 11 | ## | ||||||||||||||||||||||||||||
| 12 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||
| 13 | #################################################################################################### | ||||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | package Net::DRI::Protocol::EPP::Extensions::ARNES::Contact; | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 18 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 19 | 1 | ▶ | use feature 'state'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 20 | |||||||||||||||||||||||||||||
| 21 | =pod | ||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | =head1 NAME | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | Net::DRI::Protocol::EPP::Extensions::ARNES::Contact - ARNES (.SI) EPP Contact extensions for Net::DRI | ||||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | =head1 DESCRIPTION | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | Please see the README file for details. | ||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | =head1 SUPPORT | ||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | For now, support questions should be sent to: | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||
| 36 | |||||||||||||||||||||||||||||
| 37 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | =head1 SEE ALSO | ||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||
| 41 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | =head1 AUTHOR | ||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||||||||||||
| 46 | |||||||||||||||||||||||||||||
| 47 | =head1 COPYRIGHT | ||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | Copyright (c) 2008,2013,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||||||||||||
| 50 | All rights reserved. | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||||||||||||
| 53 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||||||||||||
| 54 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||||||||||||
| 55 | (at your option) any later version. | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | =cut | ||||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||||
| 61 | #################################################################################################### | ||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||
| 63 | sub register_commands | ||||||||||||||||||||||||||||
| 64 | { | ||||||||||||||||||||||||||||
| 65 | 0 | ▶ | my ($class,$version)=@_; | ||||||||||||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 66 | 0 | state $rcmds = { 'contact' => { 'create' => [ \&create, undef ], | |||||||||||||||||||||||||||
| 67 | 'info' => [ undef, \&info_parse ], | ||||||||||||||||||||||||||||
| 68 | }, | ||||||||||||||||||||||||||||
| 69 | }; | ||||||||||||||||||||||||||||
| 70 | 0 | return $rcmds; | |||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||
| 73 | #################################################################################################### | ||||||||||||||||||||||||||||
| 74 | |||||||||||||||||||||||||||||
| 75 | sub create | ||||||||||||||||||||||||||||
| 76 | { | ||||||||||||||||||||||||||||
| 77 | 0 | ▶ | my ($epp,$contact)=@_; | ||||||||||||||||||||||||||
|
Subroutine
create: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||
| 79 | # validate() has been called | ||||||||||||||||||||||||||||
| 80 | 0 | ▶ | return unless $contact->ctype(); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||
| 82 | 0 | my $mes=$epp->message(); | |||||||||||||||||||||||||||
| 83 | 0 | my $eid=$mes->command_extension_register('dnssi','ext'); | |||||||||||||||||||||||||||
| 84 | 0 | $mes->command_extension($eid,[['dnssi:create', ['dnssi:contact',{type=>$contact->ctype()}]]]); | |||||||||||||||||||||||||||
| 85 | 0 | return; | |||||||||||||||||||||||||||
| 86 | } | ||||||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||||
| 88 | sub info_parse | ||||||||||||||||||||||||||||
| 89 | { | ||||||||||||||||||||||||||||
| 90 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||||||||||||
|
Subroutine
info_parse: not called CC=8 SCAR=42.8
Pod
undocumented
| |||||||||||||||||||||||||||||
| 91 | 0 | my $mes=$po->message(); | |||||||||||||||||||||||||||
| 92 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 93 | |||||||||||||||||||||||||||||
| 94 | 0 | my $infdata=$mes->get_extension('dnssi','ext'); | |||||||||||||||||||||||||||
| 95 | 0 | ▶ | return unless $infdata; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 96 | |||||||||||||||||||||||||||||
| 97 | 0 | $infdata=$infdata->getChildrenByTagNameNS($mes->ns('dnssi'),'info'); | |||||||||||||||||||||||||||
| 98 | 0 | ▶ | return unless ($infdata && $infdata->size()==1); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$infdata and $infdata->size == 1
MC/DC0%0/2
$infdata and $infdata->size == 1
$infdata
$infdata->size == 1
Truth table0%0/3
A and B
A= $infdataB= $infdata->size == 1
| |||||||||||||||||||||||||||||
| 99 | 0 | $infdata=$infdata->get_node(1)->getChildrenByTagNameNS($mes->ns('dnssi'),'contact'); | |||||||||||||||||||||||||||
| 100 | 0 | ▶ | return unless ($infdata && $infdata->size()==1); | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$infdata and $infdata->size == 1
MC/DC0%0/2
$infdata and $infdata->size == 1
$infdata
$infdata->size == 1
Truth table0%0/3
A and B
A= $infdataB= $infdata->size == 1
| |||||||||||||||||||||||||||||
| 101 | |||||||||||||||||||||||||||||
| 102 | 0 | ▶ | $rinfo->{contact}->{$oname}->{self}->ctype($1) if $infdata->get_node(1)->getAttribute('type')=~m/^(org|person)$/; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 103 | |||||||||||||||||||||||||||||
| 104 | 0 | return; | |||||||||||||||||||||||||||
| 105 | } | ||||||||||||||||||||||||||||
| 106 | |||||||||||||||||||||||||||||
| 107 | #################################################################################################### | ||||||||||||||||||||||||||||
| 108 | 1 | 1; | |||||||||||||||||||||||||||