File Coverage

blib/lib/Net/DRI/Protocol/EPP/Extensions/Nominet.pm
Criterion Covered Total %
statement 9 9 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 12 12 100.0


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, .UK EPP extensions
2             ## As seen on http://www.nominet.org.uk/registrars/systems/epp/ and http://www.nominet.org.uk/digitalAssets/16844_EPP_Mapping.pdf
3             ##
4             ## Copyright (c) 2008,2009 Patrick Mevzek . All rights reserved.
5             ## (c) 2013 Michael Holloway . 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::Protocol::EPP::Extensions::Nominet;
18              
19 2     2   2049 use strict;
  2         5  
  2         77  
20 2     2   10 use warnings;
  2         3  
  2         65  
21              
22 2     2   12 use base qw/Net::DRI::Protocol::EPP/;
  2         4  
  2         1046  
23              
24             use Net::DRI::Data::Contact::Nominet;
25              
26             =pod
27              
28             =head1 NAME
29              
30             Net::DRI::Protocol::EPP::Extensions::Nominet - .UK EPP extensions for Net::DRI
31              
32             =head1 DESCRIPTION
33              
34             Please see the README file for details.
35              
36             =head1 SUPPORT
37              
38             For now, support questions should be sent to:
39              
40             Enetdri@dotandco.comE
41              
42             Please also see the SUPPORT file in the distribution.
43              
44             =head1 SEE ALSO
45              
46             Ehttp://www.dotandco.com/services/software/Net-DRI/E
47              
48             =head1 AUTHOR
49              
50             Patrick Mevzek, Enetdri@dotandco.comE
51              
52             =head1 COPYRIGHT
53              
54             Copyright (c) 2008,2009 Patrick Mevzek .
55             (c) 2013 Michael Holloway .
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 setup
70             {
71             my ($self,$rp)=@_;
72             my @extNS=qw/contact-nom-ext-1.0 domain-nom-ext-1.2 std-contact-id-1.0 std-fork-1.0 std-handshake-1.0 std-list-1.0 std-locks-1.0 std-notifications-1.2 std-release-1.0 std-unrenew-1.0 std-warning-1.1 nom-abuse-feed-1.0/;
73             foreach my $ns (@extNS) { $self->ns({ (split(/-([^-]+)$/,$ns))[0] => ['http://www.nominet.org.uk/epp/xml/'.$ns,$ns.'.xsd'] }); }
74             foreach my $o (qw/first-bill recur-bill auto-bill next-bill notes reseller auto-period next-period renew-not-required/) { $self->capabilities('domain_update',$o,['set']); }
75             $self->factories('contact',sub { return Net::DRI::Data::Contact::Nominet->new(); });
76             $self->default_parameters({domain_create => { auth => { pw => '' } } }); ## domain:authInfo is not used by Nominet
77             return;
78             }
79              
80             sub core_contact_types { return (); }
81             sub default_extensions { return qw/Nominet::Session Nominet::Message Nominet::Domain Nominet::Contact Nominet::Notifications/; }
82              
83              
84             ####################################################################################################
85             1;