File Coverage

blib/lib/Net/DRI/DRD/DNSBelgium.pm
Criterion Covered Total %
statement 24 34 70.5
branch 1 4 25.0
condition n/a
subroutine 9 14 64.2
pod 4 9 44.4
total 38 61 62.3


line stmt bran cond sub pod time code
1             ## Domain Registry Interface, DNSBelgium (.BE) policies for Net::DRI
2             ##
3             ## Copyright (c) 2006-2011,2O16 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::DNSBelgium;
17              
18 3     3   1390 use utf8;
  3         4  
  3         13  
19 3     3   65 use strict;
  3         3  
  3         39  
20 3     3   6 use warnings;
  3         4  
  3         60  
21              
22 3     3   9 use base qw/Net::DRI::DRD/;
  3         3  
  3         1007  
23              
24 3     3   13 use DateTime::Duration;
  3         5  
  3         689  
25              
26             __PACKAGE__->make_exception_for_unavailable_operations(qw/domain_transfer_stop domain_transfer_query domain_transfer_accept domain_transfer_refuse domain_renew contact_check contact_transfer/);
27              
28             =pod
29              
30             =head1 NAME
31              
32             Net::DRI::DRD::DNSBelgium - DNSBelgium (.BE) policies for Net::DRI
33              
34             =head1 DESCRIPTION
35              
36             Please see the README file for details.
37              
38             =head1 SUPPORT
39              
40             For now, support questions should be sent to:
41              
42             Enetdri@dotandco.comE
43              
44             Please also see the SUPPORT file in the distribution.
45              
46             =head1 SEE ALSO
47              
48             Ehttp://www.dotandco.com/services/software/Net-DRI/E
49              
50             =head1 AUTHOR
51              
52             Patrick Mevzek, Enetdri@dotandco.comE
53              
54             =head1 COPYRIGHT
55              
56             Copyright (c) 2006-2011,2016 Patrick Mevzek .
57             (c) 2013 Michael Holloway .
58             All rights reserved.
59              
60             This program is free software; you can redistribute it and/or modify
61             it under the terms of the GNU General Public License as published by
62             the Free Software Foundation; either version 2 of the License, or
63             (at your option) any later version.
64              
65             See the LICENSE file that comes with this distribution for more details.
66              
67             =cut
68              
69             #####################################################################################
70              
71             sub new
72             {
73 2     2 0 3 my $class=shift;
74 2         10 my $self=$class->SUPER::new(@_);
75 2         8 $self->{info}->{host_as_attr}=1;
76 2         3 $self->{info}->{contact_i18n}=1; ## LOC only
77 2         5 return $self;
78             }
79              
80 0     0 1 0 sub periods { return map { DateTime::Duration->new(years => $_) } (1); }
  0         0  
81 2     2 1 4 sub name { return 'DNSBelgium'; }
82 2     2 1 10 sub tlds { return ('be'); }
83 0     0 1 0 sub object_types { return (qw/domain contact nsgroup keygroup/); }
84 0     0 0 0 sub profile_types { return qw/epp das/; }
85              
86             sub transport_protocol_default
87             {
88 2     2 0 3 my ($self,$type)=@_;
89              
90 2 50       9 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::DNSBE',{}) if $type eq 'epp';
91 0 0         return ('Net::DRI::Transport::Socket',{remote_host=>'whois.dns.be'},'Net::DRI::Protocol::DAS',{no_tld=>1}) if $type eq 'das';
92 0           return;
93             }
94              
95             ####################################################################################################
96             ## From ยง2 of Enduser_Terms_And_Conditions_fr_v3.1.pdf
97             sub verify_name_domain
98             {
99 0     0 0   my ($self,$ndr,$domain,$op)=@_;
100 0           return $self->_verify_name_rules($domain,$op,{ check_name => 1,
101             my_tld => 1,
102             min_length => 2,
103             no_double_hyphen => 1,
104             });
105             }
106              
107              
108             sub domain_request_authcode
109             {
110 0     0 0   my ($self, $reg, $dom, $rd) = @_;
111 0           return $reg->process('domain', 'request_authcode', [$dom, $rd]);
112             }
113              
114              
115             #####################################################################################################
116             1;