1## Domain Registry Interface, Afilias ccTLD policies for .VC 2## 3## Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. 4## 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# 17#################################################################################################### 18 19package Net::DRI::DRD::VC; 20 21use strict; 22use warnings; 23 24use base qw/Net::DRI::DRD/; 25 26use DateTime::Duration; 27 28our $VERSION=do { my @r=(q$Revision: 1.3 $=~/\d+/g); sprintf("%d".".%02d" x $#r, @r); }; 29 30=pod 31 32=head1 NAME 33 34Net::DRI::DRD::VC - .VC policies for Net::DRI 35 36=head1 DESCRIPTION 37 38Please see the README file for details. 39 40=head1 SUPPORT 41 42For now, support questions should be sent to: 43 44E<lt>tonnerre.lombard@sygroup.chE<gt> 45 46Please also see the SUPPORT file in the distribution. 47 48=head1 SEE ALSO 49 50E<lt>http://oss.bsdprojects.net/projects/netdri/E<gt> 51 52=head1 AUTHOR 53 54Tonnerre Lombard, E<lt>tonnerre.lombard@sygroup.chE<gt> 55 56=head1 COPYRIGHT 57 58Copyright (c) 2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. 59All rights reserved. 60 61This program is free software; you can redistribute it and/or modify 62it under the terms of the GNU General Public License as published by 63the Free Software Foundation; either version 2 of the License, or 64(at your option) any later version. 65 66See the LICENSE file that comes with this distribution for more details. 67 68=cut 69 70#################################################################################################### 71 72sub new 73{ 74 my $class=shift; 75 my $self=$class->SUPER::new(@_); 76 $self->{info}->{host_as_attr}=0; 77 78 bless($self,$class); 79 return $self; 80} 81 82sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); } 83sub name { return 'Afilias VC'; } 84sub tlds { return qw/vc com.vc net.vc org.vc/; } 85sub object_types { return ('domain','contact','ns'); } 86sub profile_types { return qw/epp/; } 87 88sub transport_protocol_default 89{ 90 my ($self,$type)=@_; 91 92 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::Afilias',{}) if $type eq 'epp'; 93 return; 94} 95 96#################################################################################################### 97## http://www.afilias-grs.info/public/policies/vc 98sub verify_name_domain 99{ 100 my ($self,$ndr,$domain,$op)=@_; 101 return $self->_verify_name_rules($domain,$op,{check_name => 1, 102 my_tld => 1, 103 min_length => 2, 104 }); 105} 106 107#################################################################################################### 1081; 109