File Coverage

blib/lib/Net/DRI/DRD/CoCCA.pm
Criterion Covered Total %
statement 16 23 69.5
branch 1 2 50.0
condition n/a
subroutine 7 11 63.6
pod 4 7 57.1
total 28 43 65.1


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, CoCCA Registry Driver for multiple TLDs
2             ##
3             ## Copyright (c) 2008-2010 Patrick Mevzek . 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::DRD::CoCCA;
16              
17 2     2   1027 use strict;
  2         4  
  2         58  
18 2     2   8 use warnings;
  2         3  
  2         43  
19              
20 2     2   19 use base qw/Net::DRI::DRD/;
  2         4  
  2         652  
21              
22 2     2   16 use DateTime::Duration;
  2         3  
  2         345  
23              
24             =pod
25              
26             =head1 NAME
27              
28             Net::DRI::DRD::CoCCA - CoCCA Registry driver for Net::DRI
29              
30             =head1 DESCRIPTION
31              
32             Please see the README file for details.
33              
34             This is only a prototype for testing purpose. Each TLD registry should have its own DRD module
35             implementing local policies.
36              
37             =head1 SUPPORT
38              
39             For now, support questions should be sent to:
40              
41             Enetdri@dotandco.comE
42              
43             Please also see the SUPPORT file in the distribution.
44              
45             =head1 SEE ALSO
46              
47             Ehttp://www.dotandco.com/services/software/Net-DRI/E
48              
49             =head1 AUTHOR
50              
51             Patrick Mevzek, Enetdri@dotandco.comE
52              
53             =head1 COPYRIGHT
54              
55             Copyright (c) 2008-2010 Patrick Mevzek .
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 0     0 1 0 sub periods { return map { DateTime::Duration->new(years => $_) } (1..5); }
  0         0  
70 1     1 1 3 sub name { return 'CoCCA'; }
71 1     1 1 5 sub tlds { return (qw/cx gs tl ki mu nf ht na ng cc cm sb mg/); }
72 0     0 1 0 sub object_types { return ('domain','ns','contact'); }
73 0     0 0 0 sub profile_types { return qw/epp/; }
74              
75             sub transport_protocol_default
76             {
77 1     1 0 1 my ($self,$type)=@_;
78              
79 1 50       6 return ('Net::DRI::Transport::Socket',{remote_host => 'ote.epp.cocca.cx'},'Net::DRI::Protocol::EPP',{}) if $type eq 'epp';
80 0           return;
81             }
82              
83             ####################################################################################################
84              
85             sub verify_duration_transfer
86             {
87 0     0 0   my ($self,$ndr,$duration,$domain,$op)=@_;
88              
89 0           return $self->_verify_duration_transfer_15days($ndr,$duration,$domain,$op);
90             }
91              
92             ####################################################################################################
93             1;