File Coverage

blib/lib/Net/DRI/DRD/BE.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, .BE (DNSBE) policies for Net::DRI
2             ##
3             ## Copyright (c) 2006-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::BE;
17              
18 3     3   1866 use utf8;
  3         4  
  3         22  
19 3     3   78 use strict;
  3         4  
  3         64  
20 3     3   9 use warnings;
  3         4  
  3         80  
21              
22 3     3   16 use base qw/Net::DRI::DRD/;
  3         3  
  3         1221  
23              
24 3     3   25 use DateTime::Duration;
  3         6  
  3         917  
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::BE - .BE (DNSBE) 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 Patrick Mevzek .
57             All rights reserved.
58              
59             This program is free software; you can redistribute it and/or modify
60             it under the terms of the GNU General Public License as published by
61             the Free Software Foundation; either version 2 of the License, or
62             (at your option) any later version.
63              
64             See the LICENSE file that comes with this distribution for more details.
65              
66             =cut
67              
68             #####################################################################################
69              
70             sub new
71             {
72 2     2 0 4 my $class=shift;
73 2         13 my $self=$class->SUPER::new(@_);
74 2         14 $self->{info}->{host_as_attr}=1;
75 2         3 $self->{info}->{contact_i18n}=1; ## LOC only
76 2         5 return $self;
77             }
78              
79 0     0 1 0 sub periods { return map { DateTime::Duration->new(years => $_) } (1); }
  0         0  
80 2     2 1 6 sub name { return 'DNSBE'; }
81 2     2 1 7 sub tlds { return ('be'); }
82 0     0 1 0 sub object_types { return (qw/domain contact nsgroup keygroup/); }
83 0     0 0 0 sub profile_types { return qw/epp das/; }
84              
85             sub transport_protocol_default
86             {
87 2     2 0 3 my ($self,$type)=@_;
88              
89 2 50       19 return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::DNSBE',{}) if $type eq 'epp';
90 0 0         return ('Net::DRI::Transport::Socket',{remote_host=>'whois.dns.be'},'Net::DRI::Protocol::DAS',{no_tld=>1}) if $type eq 'das';
91 0           return;
92             }
93              
94             ####################################################################################################
95             ## From ยง2 of Enduser_Terms_And_Conditions_fr_v3.1.pdf
96             sub verify_name_domain
97             {
98 0     0 0   my ($self,$ndr,$domain,$op)=@_;
99 0           return $self->_verify_name_rules($domain,$op,{ check_name => 1,
100             my_tld => 1,
101             min_length => 2,
102             no_double_hyphen => 1,
103             });
104             }
105              
106              
107             sub domain_request_authcode
108             {
109 0     0 0   my ($self, $reg, $dom, $rd) = @_;
110 0           return $reg->process('domain', 'request_authcode', [$dom, $rd]);
111             }
112              
113              
114             #####################################################################################################
115             1;