| 1 | ## Domain Registry Interface, EPP IDN Language (EPP-IDN-Lang-Mapping.pdf) | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2007,2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. All rights reserved. | ||||||||||
| 4 | ## Copyright (c) 2016 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::Afilias::IDNLanguage; | ||||||||||
| 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 | 1 | ▶ | use Net::DRI::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 1 | ▶ | use Net::DRI::Exception; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | =pod | ||||||||||
| 26 | |||||||||||
| 27 | =head1 NAME | ||||||||||
| 28 | |||||||||||
| 29 | Net::DRI::Protocol::EPP::Extensions::Afilias::IDNLanguage - Afilias EPP IDN Language commands (EPP-IDN-Lang-Mapping.pdf) for Net::DRI | ||||||||||
| 30 | |||||||||||
| 31 | =head1 DESCRIPTION | ||||||||||
| 32 | |||||||||||
| 33 | Please see the README file for details. | ||||||||||
| 34 | |||||||||||
| 35 | =head1 SUPPORT | ||||||||||
| 36 | |||||||||||
| 37 | For now, support questions should be sent to: | ||||||||||
| 38 | |||||||||||
| 39 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 40 | |||||||||||
| 41 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 42 | |||||||||||
| 43 | =head1 SEE ALSO | ||||||||||
| 44 | |||||||||||
| 45 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> and | ||||||||||
| 46 | E<lt>http://oss.bdsprojects.net/projects/netdri/E<gt> | ||||||||||
| 47 | |||||||||||
| 48 | =head1 AUTHOR | ||||||||||
| 49 | |||||||||||
| 50 | Tonnerre Lombard E<lt>tonnerre.lombard@sygroup.chE<gt> | ||||||||||
| 51 | |||||||||||
| 52 | =head1 COPYRIGHT | ||||||||||
| 53 | |||||||||||
| 54 | Copyright (c) 2007,2008,2013 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||
| 55 | Copyright (c) 2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 56 | All rights reserved. | ||||||||||
| 57 | |||||||||||
| 58 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 59 | it under the terms of the GNU General Public License as published by | ||||||||||
| 60 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 61 | (at your option) any later version. | ||||||||||
| 62 | |||||||||||
| 63 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 64 | |||||||||||
| 65 | =cut | ||||||||||
| 66 | |||||||||||
| 67 | #################################################################################################### | ||||||||||
| 68 | |||||||||||
| 69 | sub register_commands | ||||||||||
| 70 | 0 | ▶ | { | ||||||||
|
Subroutine
register_commands: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 71 | 0 | my ($class,$version)=@_; | |||||||||
| 72 | 0 | state $cmds = { 'domain' => { 'create' => [ \&create, undef ], 'check' => [ \&check, undef ] } }; | |||||||||
| 73 | |||||||||||
| 74 | 0 | return $cmds; | |||||||||
| 75 | } | ||||||||||
| 76 | |||||||||||
| 77 | #################################################################################################### | ||||||||||
| 78 | |||||||||||
| 79 | sub add_language | ||||||||||
| 80 | 0 | ▶ | { | ||||||||
|
Subroutine
add_language: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 81 | 0 | my ($tag,$epp,$domain,$rd)=@_; | |||||||||
| 82 | 0 | my $mes=$epp->message(); | |||||||||
| 83 | |||||||||||
| 84 | 0 | ▶ | if (Net::DRI::Util::has_key($rd,'language')) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 85 | { | ||||||||||
| 86 | 0 | ▶ | Net::DRI::Exception::usererr_invalid_parameters('IDN language tag must be of type XML schema language') unless Net::DRI::Util::xml_is_language($rd->{language}); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | 0 | my $eid=$mes->command_extension_register('idn', $tag); | |||||||||
| 88 | 0 | $mes->command_extension($eid,['idn:script', $rd->{language}]); | |||||||||
| 89 | } | ||||||||||
| 90 | 0 | return; | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | sub create | ||||||||||
| 94 | 0 | ▶ | { | ||||||||
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 95 | 0 | my (@args)=@_; | |||||||||
| 96 | 0 | return add_language('create',@args); | |||||||||
| 97 | } | ||||||||||
| 98 | |||||||||||
| 99 | sub check | ||||||||||
| 100 | 0 | ▶ | { | ||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 101 | 0 | my (@args)=@_; | |||||||||
| 102 | 0 | return add_language('check',@args); | |||||||||
| 103 | } | ||||||||||
| 104 | |||||||||||
| 105 | #################################################################################################### | ||||||||||
| 106 | 1 | 1; | |||||||||