File Coverage

blib/lib/Net/DRI/Protocol/EPP/Extensions/NO.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, NORID (.NO) EPP extensions
2             ##
3             ## Copyright (c) 2008-2013 UNINETT Norid AS, Ehttp://www.norid.noE,
4             ## Trond Haugen Einfo@norid.noE
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::Protocol::EPP::Extensions::NO;
18              
19 2     2   1433 use strict;
  2         4  
  2         53  
20 2     2   5 use warnings;
  2         3  
  2         44  
21              
22 2     2   6 use base qw/Net::DRI::Protocol::EPP/;
  2         2  
  2         774  
23              
24             use Net::DRI::Data::Contact::NO;
25              
26             =pod
27              
28             =head1 NAME
29              
30             Net::DRI::Protocol::EPP::Extensions::NO - .NO 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             Trond Haugen, Einfo@norid.noE
51              
52             =head1 COPYRIGHT
53              
54             Copyright (c) 2008-2013 UNINETT Norid AS, Ehttp://www.norid.noE,
55             Trond Haugen Einfo@norid.noE
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             my ($self,$rp)=@_;
71             $self->ns({ no_contact => [ 'http://www.norid.no/xsd/no-ext-contact-1.0','no-ext-contact-1.0.xsd' ],
72             no_domain => [ 'http://www.norid.no/xsd/no-ext-domain-1.0','no-ext-domain-1.0.xsd' ],
73             no_domain_1_1 => [ 'http://www.norid.no/xsd/no-ext-domain-1.1','no-ext-domain-1.1.xsd' ],
74             no_host => [ 'http://www.norid.no/xsd/no-ext-host-1.0','no-ext-host-1.0.xsd' ],
75             no_result => [ 'http://www.norid.no/xsd/no-ext-result-1.0','no-ext-result-1.0.xsd' ],
76             no_epp => [ 'http://www.norid.no/xsd/no-ext-epp-1.0','no-ext-epp-1.0.xsd' ],
77             });
78              
79              
80             foreach my $o (qw/mobilephone identity xdisclose facets/) { $self->capabilities('contact_update',$o,['set']); }
81             foreach my $o (qw/organization rolecontact xemail/) { $self->capabilities('contact_update',$o,['add','del']); }
82             $self->capabilities('host_update','contact',['set']);
83             $self->capabilities('host_update','facets',['set']);
84             $self->capabilities('domain_update','facets',['set']);
85             $self->capabilities('domain_update','applicantdataset',['set']);
86             $self->factories('contact',sub { return Net::DRI::Data::Contact::NO->new(); });
87              
88             return;
89             }
90              
91             sub default_extensions { return qw/NO::Domain NO::Contact NO::Host NO::Result NO::Message/; }
92              
93             ####################################################################################################
94             1;