blib/lib/Net/DNS/ToolKit.pm

filter: Statementstmt 100% 73 / 73 Branchbran 100% 18 / 18 Conditioncond 44.4% 4 / 9 MC/DCmcdc 16.6% 1 / 6 Subroutinesub 90.0% 9 / 10 Podpod 100% 4 / 4 totaltotal 90.8% 109 / 120 CC 27 SCAR 17.1
CC
27
Cov
95%
get_ns
11.6
newhead
7.0
ttlAlpha2Num
7.0
CRAP 5.5
« blib/lib/Net/DNS/ToolKit/RR/SRV.pm ↑ Summary blib/lib/Net/DNS/ToolKit/RR/AFSDB.pm »
1 package Net::DNS::ToolKit;
2  
3 55 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 #use warnings;
5 #use Carp;
6  
7 55 ▶use Net::DNS::Codes 0.06 qw(:RRs :constants);
Subroutine BEGIN: called CC=1 SCAR=0.0
8 55 ▶use vars qw(@ISA $VERSION @EXPORT_OK %timeX);
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 55 ▶use NetAddr::IP::Util qw(:inet);
Subroutine BEGIN: called CC=1 SCAR=0.0
11 20 require Exporter;
12 20 require DynaLoader;
13 55 ▶use AutoLoader qw(AUTOLOAD);
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 20 @ISA = qw(Exporter DynaLoader);
16  
17 20 $VERSION = do { my @r = (q$Revision: 0.48 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
18  
19 20 @EXPORT_OK = qw(
20 get1char
21 get16
22 get32
23 put1char
24 put16
25 put32
26 getIPv4
27 putIPv4
28 getIPv6
29 putIPv6
30 getstring
31 putstring
32 dn_comp
33 dn_expand
34 parse_char
35 gethead
36 newhead
37 getflags
38 putflags
39 get_qdcount
40 get_ancount
41 get_nscount
42 get_arcount
43 put_qdcount
44 put_ancount
45 put_nscount
46 put_arcount
47 inet_aton
48 inet_ntoa
49 ipv6_aton
50 ipv6_n2x
51 ipv6_n2d
52 sec2time
53 ttlAlpha2Num
54 collapse
55 strip
56 get_ns
57 gettimeofday
58 );
59  
60 ## stuff for sec2time, ttlAlpha2Num
61 20 %timeX = ( # multipliers
62 's' => 1, # seconds
63 'm' => 60, # minutes
64 'h' => 60 * 60, # hours
65 'd' => 24 * 60 * 60, # days
66 'w' => 7 * 24 * 60 * 60, # weeks
67 );
68  
69 #sub AUTOLOAD {
70 # # This AUTOLOAD is used to 'autoload' constants from the constant()
71 # # XS function. If a constant is not found then control is passed
72 # # to the AUTOLOAD in AutoLoader.
73 #
74 # my $constname;
75 # our $AUTOLOAD;
76 # ($constname = $AUTOLOAD) =~ s/.*:://;
77 # croak "& not defined" if $constname eq 'constant';
78 # my $val = constant($constname, @_ ? $_[0] : 0);
79 # if ($! != 0) {
80 # if ($! =~ /Invalid/ || $!{EINVAL}) {
81 # $AutoLoader::AUTOLOAD = $AUTOLOAD;
82 # goto &AutoLoader::AUTOLOAD;
83 # }
84 # else {
85 # croak "Your vendor has not defined CTest macro $constname";
86 # }
87 # }
88 # {
89 # no strict 'refs';
90 # # Fixed between 5.005_53 and 5.005_61
91 # if ($] >= 5.00561) {
92 # *$AUTOLOAD = sub () { $val };
93 # }
94 # else {
95 # *$AUTOLOAD = sub { $val };
96 # }
97 # }
98 # goto &$AUTOLOAD;
99 #}
100  
101 20 bootstrap Net::DNS::ToolKit $VERSION;
102  
103 # Preloaded methods go here.
104  
105 # Autoload methods go after =cut, and are processed by the autosplit program.
106  
107 0 ▶sub DESTROY {}
Subroutine DESTROY: not called CC=1 SCAR=0.0
108  
109 20 1;
110 __END__
« blib/lib/Net/DNS/ToolKit/RR/SRV.pm ↑ Summary blib/lib/Net/DNS/ToolKit/RR/AFSDB.pm »