File Coverage

blib/lib/Net/DRI/DRD/Nominet.pm
Criterion Covered Total %
statement 27 48 56.2
branch 2 4 50.0
condition n/a
subroutine 10 21 47.6
pod 4 15 26.6
total 43 88 48.8


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, .UK (Nominet) policies for Net::DRI
2             ##
3             ## Copyright (c) 2007-2011 Patrick Mevzek . All rights reserved.
4             ## (c) 2013 Michael Holloway . 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::DRD::Nominet;
17              
18 2     2   1325 use strict;
  2         4  
  2         52  
19 2     2   6 use warnings;
  2         3  
  2         46  
20              
21 2     2   170 use base qw/Net::DRI::DRD/;
  2         3  
  2         760  
22              
23 2     2   10 use Net::DRI::Util;
  2         3  
  2         28  
24 2     2   6 use Net::DRI::Exception;
  2         2  
  2         27  
25              
26 2     2   6 use DateTime::Duration;
  2         2  
  2         832  
27              
28             __PACKAGE__->make_exception_for_unavailable_operations(qw/domain_update_status_add domain_update_status_del domain_update_status_set domain_update_status domain_status_allows_delete domain_status_allows_update domain_status_allows_transfer domain_status_allows_renew domain_status_allows domain_current_status host_update_status_add host_update_status_del host_update_status_set host_update_status host_current_status contact_update_status_add contact_update_status_del contact_update_status_set contact_update_status contact_current_status contact_transfer contact_transfer_start contact_transfer_stop contact_transfer_query domain_transfer_stop domain_transfer_query host_delete contact_delete/);
29              
30             =pod
31              
32             =head1 NAME
33              
34             Net::DRI::DRD::Nominet - .UK (Nominet) policies for Net::DRI
35              
36             =head1 DESCRIPTION
37              
38             Please see the README file for details.
39              
40             =head1 SUPPORT
41              
42             For now, support questions should be sent to:
43              
44             Enetdri@dotandco.comE
45              
46             Please also see the SUPPORT file in the distribution.
47              
48             =head1 SEE ALSO
49              
50             Ehttp://www.dotandco.com/services/software/Net-DRI/E
51              
52             =head1 AUTHOR
53              
54             Patrick Mevzek, Enetdri@dotandco.comE
55              
56             =head1 COPYRIGHT
57              
58             Copyright (c) 2007-2011 Patrick Mevzek .
59             (c) 2013 Michael Holloway .
60             All rights reserved.
61              
62             This program is free software; you can redistribute it and/or modify
63             it under the terms of the GNU General Public License as published by
64             the Free Software Foundation; either version 2 of the License, or
65             (at your option) any later version.
66              
67             See the LICENSE file that comes with this distribution for more details.
68              
69             =cut
70              
71             ####################################################################################################
72              
73             sub new
74             {
75 1     1 0 2 my $class=shift;
76 1         5 my $self=$class->SUPER::new(@_);
77 1         4 $self->{info}->{contact_i18n}=1; ## LOC only
78 1         3 return $self;
79             }
80              
81 0     0 1 0 sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
  0         0  
82 1     1 1 3 sub name { return 'Nominet'; }
83 1     1 1 2 sub tlds { return qw/co.uk ltd.uk me.uk net.uk org.uk plc.uk sch.uk/; }
84 0     0 1 0 sub object_types { return qw/domain contact ns/; }
85 0     0 0 0 sub profile_types { return qw/epp/; }
86              
87             sub transport_protocol_default
88             {
89 1     1 0 2 my ($self,$type)=@_;
90 1 50       2 Net::DRI::Exception->die(0,'DRD',6,"Nominet EPP no longer supported, please use Standard EPP interface") if $type eq 'epp_nominet';
91 1 50       5 return ('Net::DRI::Transport::Socket',{remote_host => 'epp.nominet.org.uk'},'Net::DRI::Protocol::EPP::Extensions::Nominet',{}) if $type eq 'epp';
92 0           return;
93             }
94              
95             ####################################################################################################
96              
97             sub domain_unrenew
98             {
99 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
100 0           return $ndr->process('domain','unrenew',[$domain,$rd]);
101             }
102              
103             sub domain_list
104             {
105 0     0 0   my ($self,$ndr,$rd)=@_;
106 0           return $ndr->process('domain','list',[$rd]);
107             }
108              
109             sub domain_lock
110             {
111 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
112 0           return $ndr->process('domain','lock',[$domain,$rd]);
113             }
114              
115             sub domain_transfer_start # release
116             {
117 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
118 0           return $ndr->process('domain','transfer_start',[$domain,$rd]);
119             }
120              
121             sub domain_transfer_accept # handshake
122             {
123 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
124 0           return $ndr->process('domain','transfer_accept',[$domain,$rd]);
125             }
126              
127             sub domain_transfer_refuse # handshake
128             {
129 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
130 0           return $ndr->process('domain','transfer_refuse',[$domain,$rd]);
131             }
132              
133             sub contact_fork
134             {
135 0     0 0   my ($self,$ndr,$contact,$rd)=@_;
136 0           return $ndr->process('contact','fork',[$contact,$rd]);
137             }
138              
139             sub contact_lock
140             {
141 0     0 0   my ($self,$ndr,$contact,$rd)=@_;
142 0           return $ndr->process('contact','lock',[$contact,$rd]);
143             }
144              
145             ####################################################################################################
146             1;