File Coverage

blib/lib/Net/DRI/DRD/SIDN.pm
Criterion Covered Total %
statement 19 27 70.3
branch 2 4 50.0
condition n/a
subroutine 7 11 63.6
pod 4 8 50.0
total 32 50 64.0


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, SIDN (.NL) Registry Driver
2             ##
3             ## Copyright (c) 2009-2011 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::SIDN;
16              
17 2     2   1167 use strict;
  2         3  
  2         50  
18 2     2   6 use warnings;
  2         2  
  2         42  
19              
20 2     2   7 use base qw/Net::DRI::DRD/;
  2         2  
  2         796  
21              
22             __PACKAGE__->make_exception_for_unavailable_operations(qw/domain_renew domain_transfer_stop domain_update_status domain_update_status_add domain_update_status_del domain_update_status_set contact_transfer contact_transfer_start contact_transfer_stop contact_transfer_query contact_transfer_accept contact_transfer_refuse contact_update_status contact_update_status_add contact_update_status_del contact_update_status_set host_update_status host_update_status_add host_update_status_del host_update_status_set host_update_name_set/);
23              
24             ####################################################################################################
25              
26             sub new
27             {
28 1     1 0 2 my $class=shift;
29 1         5 my $self=$class->SUPER::new(@_);
30 1         5 $self->{info}->{host_as_attr}=0;
31 1         1 $self->{info}->{contact_i18n}=1; ## LOC only
32 1         3 return $self;
33             }
34              
35 1     1 1 2 sub name { return 'SIDN'; }
36 1     1 1 5 sub tlds { return (qw/nl/); }
37 0     0 1 0 sub periods { return; } ## registry does not expect any duration at all
38 0     0 1 0 sub object_types { return (qw/domain contact ns/); }
39 0     0 0 0 sub profile_types { return qw/das epp/; }
40              
41             sub transport_protocol_default
42             {
43 1     1 0 2 my ($self,$type)=@_;
44              
45 1 50       2 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::DAS::SIDN',{}) if $type eq 'das';
46 1 50       3 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::SIDN',{}) if $type eq 'epp';
47 0           return;
48             }
49              
50             ####################################################################################################
51              
52             sub domain_undelete
53             {
54 0     0 0   my ($self,$ndr,$domain,$rd)=@_;
55 0           $self->enforce_domain_name_constraints($ndr,$domain,'delete_cancel');
56              
57 0           my $rc=$ndr->process('domain','delete_cancel',[$domain,$rd]);
58 0           return $rc;
59             }
60              
61             ####################################################################################################
62             1;
63              
64             __END__