« DRI/Protocol/EPP/Extensions/CNNIC/Bundling.pm
↑ Summary
DRI/Protocol/EPP/Extensions/SIDN/Message.pm »
| 1 | ## Domain Registry Interface, .IT Domain extension | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (C) 2009-2010,2016 Tower Technologies. All rights reserved. | ||||||||||
| 4 | ## | ||||||||||
| 5 | ## This program free software; you can redistribute it and/or modify | ||||||||||
| 6 | ## it under the terms of the GNU General Public License v2. | ||||||||||
| 7 | ## | ||||||||||
| 8 | |||||||||||
| 9 | package Net::DRI::Protocol::EPP::Extensions::IT::Domain; | ||||||||||
| 10 | |||||||||||
| 11 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | |||||||||||
| 14 | =pod | ||||||||||
| 15 | |||||||||||
| 16 | =head1 NAME | ||||||||||
| 17 | |||||||||||
| 18 | Net::DRI::Protocol::EPP::Extensions::IT::Domain - .IT EPP Domain extension for Net::DRI | ||||||||||
| 19 | |||||||||||
| 20 | =head1 SUPPORT | ||||||||||
| 21 | |||||||||||
| 22 | For now, support questions should be sent to: | ||||||||||
| 23 | |||||||||||
| 24 | E<lt>noc@towertech.itE<gt> | ||||||||||
| 25 | |||||||||||
| 26 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 27 | |||||||||||
| 28 | =head1 AUTHOR | ||||||||||
| 29 | |||||||||||
| 30 | Alessandro Zummo, E<lt>a.zummo@towertech.itE<gt> | ||||||||||
| 31 | |||||||||||
| 32 | =head1 COPYRIGHT | ||||||||||
| 33 | |||||||||||
| 34 | Copyright (C) 2009-2010,2016 Tower Technologies. | ||||||||||
| 35 | All rights reserved. | ||||||||||
| 36 | |||||||||||
| 37 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 38 | it under the terms of the GNU General Public License v2 as published by | ||||||||||
| 39 | the Free Software Foundation. | ||||||||||
| 40 | |||||||||||
| 41 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 42 | |||||||||||
| 43 | =cut | ||||||||||
| 44 | |||||||||||
| 45 | sub register_commands { | ||||||||||
| 46 | |||||||||||
| 47 | 0 | ▶ | my ($class, $version) = @_; | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 48 | |||||||||||
| 49 | 0 | my $ops = { | |||||||||
| 50 | 'info' => [ undef, \&parse ], | ||||||||||
| 51 | }; | ||||||||||
| 52 | |||||||||||
| 53 | return { | ||||||||||
| 54 | 0 | 'domain' => $ops, | |||||||||
| 55 | }; | ||||||||||
| 56 | } | ||||||||||
| 57 | |||||||||||
| 58 | sub parse | ||||||||||
| 59 | { | ||||||||||
| 60 | 0 | ▶ | my ($po, $type, $action, $name, $info) = @_; | ||||||||
|
Subroutine
parse: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||
| 61 | |||||||||||
| 62 | 0 | my $msg = $po->message; | |||||||||
| 63 | 0 | my $ns = $msg->ns('extdom'); | |||||||||
| 64 | |||||||||||
| 65 | 0 | my $infdata = $msg->get_extension('extdom', 'infData'); | |||||||||
| 66 | 0 | my $infns = $msg->get_extension('extdom', 'infNsToValidateData'); | |||||||||
| 67 | |||||||||||
| 68 | 0 | ▶ | if (defined $infdata) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 69 | |||||||||||
| 70 | 0 | $info->{'domain'}{$name}{'own_status'} = | |||||||||
| 71 | $infdata->getChildrenByTagNameNS($ns, 'ownStatus') | ||||||||||
| 72 | ->shift | ||||||||||
| 73 | ->getAttribute('s'); | ||||||||||
| 74 | } | ||||||||||
| 75 | |||||||||||
| 76 | 0 | ▶ | if (defined $infns) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 77 | |||||||||||
| 78 | # cannot match ./extdom:nsToValidate/domain:hostAttr/domain:hostName | ||||||||||
| 79 | # due to mixed namespace | ||||||||||
| 80 | 0 | foreach ($infns->findnodes('./extdom:nsToValidate/*/*')) { | |||||||||
| 81 | |||||||||||
| 82 | 0 | ▶ | push(@{$info->{'domain'}{$name}{'ns_to_validate'}}, | ||||||||
|
Branch: 1 branch
| |||||||||||
| 83 | $_->textContent) | ||||||||||
| 84 | if $_->getName eq 'domain:hostName'; | ||||||||||
| 85 | } | ||||||||||
| 86 | } | ||||||||||
| 87 | |||||||||||
| 88 | 0 | return 1; | |||||||||
| 89 | } | ||||||||||
| 90 | |||||||||||
| 91 | 1 | 1; | |||||||||