| 1 | ## Domain Registry Interface, EPP Message for SIDN | ||||||||||||
| 2 | ## | ||||||||||||
| 3 | ## Copyright (c) 2009-2011,2013 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::SIDN::Message; | ||||||||||||
| 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 | |||||||||||||
| 20 | #################################################################################################### | ||||||||||||
| 21 | |||||||||||||
| 22 | sub register_commands | ||||||||||||
| 23 | 0 | ▶ | { | ||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||
| 24 | 0 | my ($class,$version)=@_; | |||||||||||
| 25 | 0 | return { 'message' => { 'result' => [ undef, \&parse ] } }; | |||||||||||
| 26 | } | ||||||||||||
| 27 | |||||||||||||
| 28 | sub parse | ||||||||||||
| 29 | 0 | ▶ | { | ||||||||||
|
Subroutine
parse: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||
| 30 | 0 | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | |||||||||||
| 31 | 0 | my $mes=$po->message(); | |||||||||||
| 32 | |||||||||||||
| 33 | ## Parse sidn:ext | ||||||||||||
| 34 | 0 | my $result=$mes->get_extension('sidn','ext'); | |||||||||||
| 35 | 0 | ▶ | return unless $result; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 36 | 0 | my $ns=$mes->ns('sidn'); | |||||||||||
| 37 | 0 | $result=$result->getChildrenByTagNameNS($ns,'response'); | |||||||||||
| 38 | 0 | ▶ | return unless $result->size(); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 39 | |||||||||||||
| 40 | ## We add it to the latest status extra_info seen. | ||||||||||||
| 41 | 0 | foreach my $el ($result->get_node(1)->getChildrenByTagNameNS($ns,'msg')) | |||||||||||
| 42 | { | ||||||||||||
| 43 | ## code is mandatory, as well as text probably, field is optional | ||||||||||||
| 44 | 0 | ▶ | $mes->add_to_extra_info({from => 'sidn', type => 'text', code => $el->getAttribute('code'),field => $el->getAttribute('field') || '', message => $el->textContent()}); | ||||||||||
|
Condition0%0/2
$el->getAttribute('field') || ''
MC/DC0%0/1
$el->getAttribute('field') || ''
$el->getAttribute('field')
Truth table0%0/2
A
A= $el->getAttribute('field')
| |||||||||||||
| 45 | } | ||||||||||||
| 46 | 0 | return; | |||||||||||
| 47 | } | ||||||||||||
| 48 | |||||||||||||
| 49 | #################################################################################################### | ||||||||||||
| 50 | 1 | 1; | |||||||||||
| 51 | |||||||||||||
| 52 | __END__ | ||||||||||||