DRI/DRD/Neustar/US.pm

filter: Statementstmt 67.5% 25 / 37 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 9 / 15 Podpod 44.4% 4 / 9 totaltotal 60.0% 39 / 65 CC 3 SCAR 7.4
CC
3
Cov
63%
transport_protocol_default
5.2
periods
2.0
object_types
2.0
CRAP 2.1
« DRI/DRD/UHSA.pm ↑ Summary DRI/DRD/puntCAT.pm »
1 ## Domain Registry Interface, .US policies
2 ##
3 ## Copyright (c) 2007,2008,2009 Tonnerre Lombard <tonnerre.lombard@sygroup.ch>. All rights reserved.
4 ## (c) 2011,2013,2016 Patrick Mevzek <netdri@dotandco.com>. 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::Neustar::US;
17  
18 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
19 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 2 ▶use base qw/Net::DRI::DRD/;
Subroutine BEGIN: called CC=1 SCAR=0.0
22  
23 2 ▶use DateTime::Duration;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 2 ▶use Net::DRI::Data::Contact::US;
Subroutine BEGIN: called CC=1 SCAR=0.0
25  
26 =pod
27  
28 =head1 NAME
29  
30 Net::DRI::DRD::Neustar::US - .US policies 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 E<lt>netdri@dotandco.comE<gt>
41  
42 Please also see the SUPPORT file in the distribution.
43  
44 =head1 SEE ALSO
45  
46 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
47  
48 =head1 AUTHOR
49  
50 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
51  
52 =head1 COPYRIGHT
53  
54 Copyright (c) 2007,2008,2009 Tonnerre Lombard E<lt>tonnerre.lombard@sygroup.chE<gt>.
55 (c) 2011,2013,2016 Patrick Mevzek <netdri@dotandco.com>.
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 new
70 {
71 1 ▶ my $class=shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
72 1 my $self=$class->SUPER::new(@_);
73 1 $self->{info}->{host_as_attr}=0;
74 1 $self->{info}->{contact_i18n}=6; ## INT only or INT+LOC (but not LOC only)
75 1 return $self;
76 }
77  
78 0 ▶sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
Subroutine periods: not called CC=1 SCAR=6.9
Pod documented
79 1 ▶sub name { return 'Neustar::US'; }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
80 1 ▶sub tlds { return ('us'); }
Subroutine tlds: called CC=1 SCAR=0.0
Pod documented
81 0 ▶sub object_types { return ('domain','contact','ns'); }
Subroutine object_types: not called CC=1 SCAR=6.9
Pod documented
82 0 ▶sub profile_types { return qw/epp whois/; }
Subroutine profile_types: not called CC=1 SCAR=6.9
Pod undocumented
83  
84 sub transport_protocol_default
85 {
86 1 ▶ my ($self,$type)=@_;
Subroutine transport_protocol_default: called CC=3 SCAR=16.5
Pod undocumented
87  
88 1 ▶ return ('Net::DRI::Transport::Socket',{},'Net::DRI::Protocol::EPP::Extensions::US',{}) if $type eq 'epp';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "epp" 1 0 1
89 0 ▶ return ('Net::DRI::Transport::Socket',{remote_host=>'whois.nic.us'},'Net::DRI::Protocol::Whois',{}) if $type eq 'whois';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "whois" 0 0 0
90 0 return;
91 }
92  
93 sub set_factories
94 {
95 0 ▶ my ($self,$po)=@_;
Subroutine set_factories: not called CC=1 SCAR=6.9
Pod undocumented
96 0 ▶ $po->factories('contact',sub { return Net::DRI::Data::Contact::US->new(@_); });
Subroutine __ANON__: not called CC=1 SCAR=6.9
97 0 return;
98 }
99  
100 ####################################################################################################
101  
102 sub verify_name_domain
103 {
104 0 ▶ my ($self,$ndr,$domain,$op)=@_;
Subroutine verify_name_domain: not called CC=1 SCAR=6.9
Pod undocumented
105 0 return $self->_verify_name_rules($domain,$op,{check_name => 1,
106 my_tld => 1,
107 icann_reserved => 1,
108 });
109 }
110  
111 ####################################################################################################
112 2 1;
« DRI/DRD/UHSA.pm ↑ Summary DRI/DRD/puntCAT.pm »