| 1 | ## Domain Registry Interface, CIRA EPP Agreement commands | ||||||||||||||||||
| 2 | ## | ||||||||||||||||||
| 3 | ## Copyright (c) 2010,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::CIRA::Agreement; | ||||||||||||||||||
| 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 | 1 | ▶ | use Net::DRI::Util; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 21 | |||||||||||||||||||
| 22 | #################################################################################################### | ||||||||||||||||||
| 23 | |||||||||||||||||||
| 24 | sub register_commands | ||||||||||||||||||
| 25 | { | ||||||||||||||||||
| 26 | 0 | ▶ | my ($class,$version)=@_; | ||||||||||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||
| 27 | 0 | return { 'agreement' => { get => [ \&get, \&get_parse ] } }; | |||||||||||||||||
| 28 | } | ||||||||||||||||||
| 29 | |||||||||||||||||||
| 30 | sub get | ||||||||||||||||||
| 31 | { | ||||||||||||||||||
| 32 | 0 | ▶ | my ($epp,$language)=@_; | ||||||||||||||||
|
Subroutine
get: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||
| 33 | 0 | my $mes=$epp->message(); | |||||||||||||||||
| 34 | 0 | my $eid=$mes->command_extension_register('cira','ciraInfo'); | |||||||||||||||||
| 35 | 0 | ▶ | $mes->command_extension($eid,[['cira:action','get CIRA latest agreement'],['cira:language',defined $language ? $language : 'en']]); | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 36 | 0 | return; | |||||||||||||||||
| 37 | } | ||||||||||||||||||
| 38 | |||||||||||||||||||
| 39 | sub get_parse | ||||||||||||||||||
| 40 | { | ||||||||||||||||||
| 41 | 0 | ▶ | my ($po,$otype,$oaction,$oname,$rinfo)=@_; | ||||||||||||||||
|
Subroutine
get_parse: not called CC=7 SCAR=40.3
Pod
undocumented
| |||||||||||||||||||
| 42 | 0 | my $mes=$po->message(); | |||||||||||||||||
| 43 | 0 | ▶ | return unless $mes->is_success(); | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 44 | |||||||||||||||||||
| 45 | 0 | my $infdata=$mes->get_extension('cira','ciraInfo'); | |||||||||||||||||
| 46 | 0 | ▶ | return unless defined $infdata; | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 47 | |||||||||||||||||||
| 48 | 0 | foreach my $el (Net::DRI::Util::xml_list_children($infdata)) | |||||||||||||||||
| 49 | { | ||||||||||||||||||
| 50 | 0 | my ($name,$c)=@$el; | |||||||||||||||||
| 51 | 0 | ▶ | if ($name eq 'language') | ||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||
| 52 | { | ||||||||||||||||||
| 53 | 0 | $rinfo->{agreement}->{cira}->{lang}=$c->textContent(); | |||||||||||||||||
| 54 | } elsif ($name eq 'ciraAgreementVersion') | ||||||||||||||||||
| 55 | { | ||||||||||||||||||
| 56 | 0 | $rinfo->{agreement}->{cira}->{version}=$c->textContent(); | |||||||||||||||||
| 57 | } elsif ($name eq 'ciraAgreement') | ||||||||||||||||||
| 58 | { | ||||||||||||||||||
| 59 | 0 | $rinfo->{agreement}->{cira}->{content}=$c->textContent(); | |||||||||||||||||
| 60 | } | ||||||||||||||||||
| 61 | } | ||||||||||||||||||
| 62 | 0 | return; | |||||||||||||||||
| 63 | } | ||||||||||||||||||
| 64 | |||||||||||||||||||
| 65 | #################################################################################################### | ||||||||||||||||||
| 66 | 1 | 1; | |||||||||||||||||
| 67 | |||||||||||||||||||
| 68 | __END__ | ||||||||||||||||||
| 69 | |||||||||||||||||||
| 70 | =pod | ||||||||||||||||||
| 71 | |||||||||||||||||||
| 72 | =head1 NAME | ||||||||||||||||||
| 73 | |||||||||||||||||||
| 74 | Net::DRI::Protocol::EPP::Extensions::CIRA::Agreement - CIRA EPP Agreement commands for Net::DRI | ||||||||||||||||||
| 75 | |||||||||||||||||||
| 76 | =head1 DESCRIPTION | ||||||||||||||||||
| 77 | |||||||||||||||||||
| 78 | Please see the README file for details. | ||||||||||||||||||
| 79 | |||||||||||||||||||
| 80 | =head1 SUPPORT | ||||||||||||||||||
| 81 | |||||||||||||||||||
| 82 | For now, support questions should be sent to: | ||||||||||||||||||
| 83 | |||||||||||||||||||
| 84 | E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||
| 85 | |||||||||||||||||||
| 86 | Please also see the SUPPORT file in the distribution. | ||||||||||||||||||
| 87 | |||||||||||||||||||
| 88 | =head1 SEE ALSO | ||||||||||||||||||
| 89 | |||||||||||||||||||
| 90 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||||||||||
| 91 | |||||||||||||||||||
| 92 | =head1 AUTHOR | ||||||||||||||||||
| 93 | |||||||||||||||||||
| 94 | Patrick Mevzek, E<lt>netdri@dotandco.comE<gt> | ||||||||||||||||||
| 95 | |||||||||||||||||||
| 96 | =head1 COPYRIGHT | ||||||||||||||||||
| 97 | |||||||||||||||||||
| 98 | Copyright (c) 2010,2013,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||||||||||
| 99 | All rights reserved. | ||||||||||||||||||
| 100 | |||||||||||||||||||
| 101 | This program is free software; you can redistribute it and/or modify | ||||||||||||||||||
| 102 | it under the terms of the GNU General Public License as published by | ||||||||||||||||||
| 103 | the Free Software Foundation; either version 2 of the License, or | ||||||||||||||||||
| 104 | (at your option) any later version. | ||||||||||||||||||
| 105 | |||||||||||||||||||
| 106 | See the LICENSE file that comes with this distribution for more details. | ||||||||||||||||||
| 107 | |||||||||||||||||||
| 108 | =cut | ||||||||||||||||||