DRI/DRD/Example.pm

filter: Statementstmt 77.2% 17 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 57.1% 4 / 7 totaltotal 70.7% 29 / 41 CC 2 SCAR 4.1
CC
2
Cov
75%
transport_protocol_default
2.3
periods
2.0
object_types
2.0
CRAP 1.5
« DRI/DRD/NASK.pm ↑ Summary DRI/DRD/CZNIC.pm »
1 ## Domain Registry Interface, Example Driver for .EXAMPLE
2 ##
3 ## Copyright (c) 2018 Patrick Mevzek <netdri@dotandco.com>. 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::Example;
16  
17 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 11 ▶use base qw/Net::DRI::DRD/;
Subroutine BEGIN: called CC=1 SCAR=0.0
21  
22 ####################################################################################################
23  
24 sub new
25 {
26 10 ▶ my $class=shift;
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
27 10 my $self=$class->SUPER::new(@_);
28 10 return $self;
29 }
30  
31 0 ▶sub periods { return map { DateTime::Duration->new(years => $_) } (1..10); }
Subroutine periods: not called CC=1 SCAR=6.9
Pod documented
32 10 ▶sub name { return 'EXAMPLE'; }
Subroutine name: called CC=1 SCAR=0.0
Pod documented
33 10 ▶sub tlds { return qw/example/; }
Subroutine tlds: called CC=1 SCAR=0.0
Pod documented
34 0 ▶sub object_types { return qw/domain ns contact/; }
Subroutine object_types: not called CC=1 SCAR=6.9
Pod documented
35 0 ▶sub profile_types { return qw/epp/; }
Subroutine profile_types: not called CC=1 SCAR=6.9
Pod undocumented
36  
37 sub transport_protocol_default
38 {
39 10 ▶ my ($self,$type)=@_;
Subroutine transport_protocol_default: called CC=2 SCAR=8.1
Pod undocumented
40  
41 10 ▶ return ('Net::DRI::Transport::Socket',{remote_host=>'localhost', remote_port=>700},'Net::DRI::Protocol::EPP',{}) if $type eq 'epp';
Branch: 1 branch
BranchTrueFalseTotal
if $type eq "epp" 10 0 10
42 0 return;
43 }
44  
45 ####################################################################################################
46 11 1;
47  
48 __END__
49  
50 =pod
51  
52 =head1 NAME
53  
54 Net::DRI::DRD::Example - Example Registry driver for Net::DRI
55  
56 =head1 DESCRIPTION
57  
58 Please see the README file for details.
59  
60 This driver will never match any existing registry, as .EXAMPLE
61 is reserved per RFC2606
62  
63 It is however useful for local tests.
64  
65 =head1 SUPPORT
66  
67 For now, support questions should be sent to:
68  
69 E<lt>netdri@dotandco.comE<gt>
70  
71 Please also see the SUPPORT file in the distribution.
72  
73 =head1 SEE ALSO
74  
75 E<lt>http://www.dotandco.com/services/software/Net-DRI/E<gt>
76  
77 =head1 AUTHOR
78  
79 Patrick Mevzek, E<lt>netdri@dotandco.comE<gt>
80  
81 =head1 COPYRIGHT
82  
83 Copyright (c) 2018 Patrick Mevzek <netdri@dotandco.com>.
84 All rights reserved.
85  
86 This program is free software; you can redistribute it and/or modify
87 it under the terms of the GNU General Public License as published by
88 the Free Software Foundation; either version 2 of the License, or
89 (at your option) any later version.
90  
91 See the LICENSE file that comes with this distribution for more details.
92  
93 =cut
94  
« DRI/DRD/NASK.pm ↑ Summary DRI/DRD/CZNIC.pm »