| 1 | ## Domain Registry Interface, nic.at domain transactions extension | ||||||||||||||||||||
| 2 | ## Contributed by Michael Braunoeder from NIC.AT <mib@nic.at> | ||||||||||||||||||||
| 3 | ## | ||||||||||||||||||||
| 4 | ## Copyright (c) 2006-2008,2013,2018 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::ATResult; | ||||||||||||||||||||
| 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::ATResult - NIC.AT Result Condition EPP Mapping 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,2013,2018 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 | my %tmp=( | |||||||||||||||||||
| 68 | login => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 69 | check => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 70 | info => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 71 | transfer_query => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 72 | create => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 73 | delete => [ undef, \&condition_parse], | ||||||||||||||||||||
| 74 | transfer_request => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 75 | transfer_cancel => [ undef,\&condition_parse ], | ||||||||||||||||||||
| 76 | transfer_answer => [ undef,\&condition_parse ], | ||||||||||||||||||||
| 77 | update => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 78 | nocommand => [ undef, \&condition_parse ], | ||||||||||||||||||||
| 79 | ); | ||||||||||||||||||||
| 80 | |||||||||||||||||||||
| 81 | 0 | return { 'domain' => \%tmp, | |||||||||||||||||||
| 82 | 'contact' => \%tmp }; | ||||||||||||||||||||
| 83 | } | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | sub setup | ||||||||||||||||||||
| 86 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
setup: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 87 | 0 | my ($class,$po,$version)=@_; | |||||||||||||||||||
| 88 | |||||||||||||||||||||
| 89 | 0 | state $ns = { 'at-ext-result' => 'http://www.nic.at/xsd/at-ext-result-1.0' }; | |||||||||||||||||||
| 90 | 0 | $po->ns($ns); | |||||||||||||||||||
| 91 | 0 | return; | |||||||||||||||||||
| 92 | } | ||||||||||||||||||||
| 93 | |||||||||||||||||||||
| 94 | sub condition_parse | ||||||||||||||||||||
| 95 | 0 | ▶ | { | ||||||||||||||||||
|
Subroutine
condition_parse: not called CC=12 SCAR=50.5
Pod
undocumented
| |||||||||||||||||||||
| 96 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||||||||||||
| 97 | 0 | my $mes=$po->message(); | |||||||||||||||||||
| 98 | |||||||||||||||||||||
| 99 | |||||||||||||||||||||
| 100 | 0 | my $condata=$mes->get_extension('at-ext-result', 'conditions'); | |||||||||||||||||||
| 101 | 0 | ▶ | return unless $condata; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 102 | |||||||||||||||||||||
| 103 | 0 | my @conditions; | |||||||||||||||||||
| 104 | 0 | my $ns = $mes->ns('at-ext-result'); | |||||||||||||||||||
| 105 | 0 | foreach my $el ($condata->getElementsByTagNameNS($ns, 'condition')) | |||||||||||||||||||
| 106 | { | ||||||||||||||||||||
| 107 | 0 | my %con; | |||||||||||||||||||
| 108 | 0 | my $c=$el->getFirstChild(); | |||||||||||||||||||
| 109 | |||||||||||||||||||||
| 110 | 0 | ▶ | $con{code}=$el->getAttribute('code') if $el->getAttribute('code'); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 111 | 0 | ▶ | $con{severity}=$el->getAttribute('severity') if $el->getAttribute('severity'); | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 112 | |||||||||||||||||||||
| 113 | |||||||||||||||||||||
| 114 | 0 | ▶ | while ($c) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 115 | { | ||||||||||||||||||||
| 116 | 0 | ▶ | next unless ($c->nodeType() == 1); ## only for element nodes | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 117 | 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
| |||||||||||||||||||||
| 118 | 0 | ▶ | next unless $name; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 119 | 0 | ▶ | if ($name=~m/^(msg|details)$/) | ||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||
| 120 | { | ||||||||||||||||||||
| 121 | 0 | $con{$1}=$c->getFirstChild()->getData(); | |||||||||||||||||||
| 122 | } elsif ($name=~m/^attributes$/) | ||||||||||||||||||||
| 123 | { | ||||||||||||||||||||
| 124 | 0 | foreach my $attr ($c->getChildrenByTagNameNS($ns, 'attr')) { | |||||||||||||||||||
| 125 | 0 | my $attrname=$attr->getAttribute('name'); | |||||||||||||||||||
| 126 | 0 | $con{"attr " .$attrname} = $attr->getFirstChild()->getData(); | |||||||||||||||||||
| 127 | } | ||||||||||||||||||||
| 128 | } | ||||||||||||||||||||
| 129 | 0 | } continue { $c=$c->getNextSibling(); } | |||||||||||||||||||
| 130 | 0 | push @conditions,\%con; | |||||||||||||||||||
| 131 | } | ||||||||||||||||||||
| 132 | |||||||||||||||||||||
| 133 | 0 | $rinfo->{domain}->{$oname}->{conditions}=\@conditions; | |||||||||||||||||||
| 134 | 0 | $rinfo->{contact}->{$oname}->{conditions}=\@conditions; | |||||||||||||||||||
| 135 | 0 | return; | |||||||||||||||||||
| 136 | } | ||||||||||||||||||||
| 137 | |||||||||||||||||||||
| 138 | #################################################################################################### | ||||||||||||||||||||
| 139 | 1 | 1; | |||||||||||||||||||