| 1 | ## Domain Registry Interface, RDS (.HN) policies for .HN | ||||||||||
| 2 | ## | ||||||||||
| 3 | ## Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||
| 4 | ## (c) 2010,2011,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 5 | ## All rights reserved. | ||||||||||
| 6 | ## | ||||||||||
| 7 | ## This file is part of Net::DRI | ||||||||||
| 8 | ## | ||||||||||
| 9 | ## Net::DRI is free software; you can redistribute it and/or modify | ||||||||||
| 10 | ## it under the terms of the GNU General Public License as published by | ||||||||||
| 11 | ## the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 12 | ## (at your option) any later version. | ||||||||||
| 13 | ## | ||||||||||
| 14 | ## See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 15 | #################################################################################################### | ||||||||||
| 16 | |||||||||||
| 17 | package Net::DRI::DRD::RDS; | ||||||||||
| 18 | |||||||||||
| 19 | 2 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 20 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | |||||||||||
| 23 | 2 | ▶ | use base qw/Net::DRI::DRD/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | |||||||||||
| 25 | 2 | ▶ | use DateTime::Duration; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | |||||||||||
| 27 | =pod | ||||||||||
| 28 | |||||||||||
| 29 | =head1 NAME | ||||||||||
| 30 | |||||||||||
| 31 | Net::DRI::DRD::RDS - RDS (.HN) policies for Net::DRI | ||||||||||
| 32 | |||||||||||
| 33 | =head1 DESCRIPTION | ||||||||||
| 34 | |||||||||||
| 35 | Please see the README file for details. | ||||||||||
| 36 | |||||||||||
| 37 | =head1 SUPPORT | ||||||||||
| 38 | |||||||||||
| 39 | For now, support questions should be sent to: | ||||||||||
| 40 | |||||||||||
| 41 | E<lt>netdri@dotandco.comE<gt> | ||||||||||
| 42 | |||||||||||
| 43 | Please also see the SUPPORT file in the distribution. | ||||||||||
| 44 | |||||||||||
| 45 | =head1 SEE ALSO | ||||||||||
| 46 | |||||||||||
| 47 | E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt> | ||||||||||
| 48 | |||||||||||
| 49 | =head1 AUTHOR | ||||||||||
| 50 | |||||||||||
| 51 | Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt> | ||||||||||
| 52 | |||||||||||
| 53 | =head1 COPYRIGHT | ||||||||||
| 54 | |||||||||||
| 55 | Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. | ||||||||||
| 56 | (c) 2010,2011,2016 Patrick Mevzek <netdri@dotandco.com>. | ||||||||||
| 57 | All rights reserved. | ||||||||||
| 58 | |||||||||||
| 59 | This program is free software; you can redistribute it and/or modify | ||||||||||
| 60 | it under the terms of the GNU General Public License as published by | ||||||||||
| 61 | the Free Software Foundation; either version 2 of the License, or | ||||||||||
| 62 | (at your option) any later version. | ||||||||||
| 63 | |||||||||||
| 64 | See the LICENSE file that comes with this distribution for more details. | ||||||||||
| 65 | |||||||||||
| 66 | =cut | ||||||||||
| 67 | |||||||||||
| 68 | #################################################################################################### | ||||||||||
| 69 | |||||||||||
| 70 | sub new | ||||||||||
| 71 | { | ||||||||||
| 72 | 1 | ▶ | my $class=shift; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 73 | 1 | my $self=$class->SUPER::new(@_); | |||||||||
| 74 | 1 | $self->{info}->{host_as_attr}=0; | |||||||||
| 75 | 1 | $self->{info}->{contact_i18n}=2; | |||||||||
| 76 | 1 | return $self; | |||||||||
| 77 | } | ||||||||||
| 78 | |||||||||||
| 79 | 1 | ▶ | sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); } | ||||||||
|
Subroutine
periods: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 80 | 1 | ▶ | sub name { return 'RDS'; } | ||||||||
|
Subroutine
name: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 81 | 3 | ▶ | sub tlds { return qw/hn com.hn net.hn org.hn edu.hn/; } | ||||||||
|
Subroutine
tlds: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 82 | 0 | ▶ | sub object_types { return ('domain','contact','ns'); } | ||||||||
|
Subroutine
object_types: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 83 | 0 | ▶ | sub profile_types { return qw/epp/; } | ||||||||
|
Subroutine
profile_types: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 84 | |||||||||||
| 85 | sub transport_protocol_default | ||||||||||
| 86 | { | ||||||||||
| 87 | 1 | ▶ | my ($self,$type)=@_; | ||||||||
|
Subroutine
transport_protocol_default: called CC=2 SCAR=8.1
Pod
undocumented
| |||||||||||
| 88 | |||||||||||
| 89 | 1 | ▶ | return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::Afilias',{}) if $type eq 'epp'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 90 | 0 | return; | |||||||||
| 91 | } | ||||||||||
| 92 | |||||||||||
| 93 | #################################################################################################### | ||||||||||
| 94 | ## http://www.afilias-grs.info/public/policies/hn | ||||||||||
| 95 | ## http://www.nic.hn/politicas/sobre_dominios.html | ||||||||||
| 96 | sub verify_name_domain | ||||||||||
| 97 | { | ||||||||||
| 98 | 1 | ▶ | my ($self,$ndr,$domain,$op)=@_; | ||||||||
|
Subroutine
verify_name_domain: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 99 | 1 | return $self->_verify_name_rules($domain,$op,{check_name => 1, | |||||||||
| 100 | my_tld => 1, | ||||||||||
| 101 | min_length => 3, ## http://www.nic.hn/politicas/sobre_dominios.html §1.c | ||||||||||
| 102 | }); | ||||||||||
| 103 | } | ||||||||||
| 104 | |||||||||||
| 105 | #################################################################################################### | ||||||||||
| 106 | 2 | 1; | |||||||||