blib/lib/Net/DNSBL/Utilities.pm

filter: Statementstmt 98.3% 180 / 183 Branchbran 84.2% 59 / 70 Conditioncond 75.8% 22 / 29 MC/DCmcdc 66.6% 12 / 18 Subroutinesub 100% 19 / 19 Podpod 100% 10 / 10 totaltotal 91.7% 302 / 329 CC 57 SCAR 19.0
CC
57
Cov
93%
statinit
10.8
bystat
10.0
list2NetAddr
9.1
CRAP 6.7
« blib/lib/Net/DNSBL/MultiDaemon.pm ↑ Summary local/test.conf »
1 #!/usr/bin/perl
2  
3 package Net::DNSBL::Utilities;
4 26 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 #use diagnostics;
6  
7 26 ▶use File::SafeDO qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
8 DO
9 doINCLUDE
10 26 );
11 26 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
12 $VERSION @ISA @EXPORT_OK *UDP
13 $A1271 $A1272 $A1273 $A1274 $A1275 $A1276 $A1277
14 $SKIP_POSIX $SKIP_NetAddrIP $AuthBit $RABit
15 26 );
16 4 $A1271 = $A1272 = $A1273 = $A1274 = $A1275 = 0;
17 4 $AuthBit = $SKIP_POSIX = $SKIP_NetAddrIP = 0;
18 26 ▶use AutoLoader 'AUTOLOAD';
Subroutine BEGIN: called CC=1 SCAR=0.0
19 4 require Exporter;
20 4 @ISA = qw(Exporter);
21  
22 4 $VERSION = do { my @r = (q$Revision: 0.10 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
23  
24 4 *DO = \&File::SafeDO::DO;
25 4 *doINCLUDE = \&File::SafeDO::doINCLUDE;
26  
27 4 @EXPORT_OK = qw(
28 s_response
29 not_found
30 write_stats
31 bystat
32 statinit
33 cntinit
34 DO
35 doINCLUDE
36 open_udpNB
37 list2NetAddr
38 matchNetAddr
39 list2hash
40 A1271
41 A1272
42 A1273
43 A1274
44 A1275
45 A1276
46 A1277
47 list_countries
48 setAUTH
49 setRA
50 );
51  
52 26 ▶use Net::DNS::Codes qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
53 BITS_QUERY
54 QR
55 NXDOMAIN
56 C_IN
57 AA
58 RA
59 26 );
60 26 ▶use Net::DNS::ToolKit 0.16 qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
61 newhead
62 26 );
63 26 ▶use Net::DNS::ToolKit::RR;
Subroutine BEGIN: called CC=1 SCAR=0.0
64 #use Net::DNS::ToolKit::Debug qw(
65 # print_head
66 # print_buf
67 #);
68  
69 # used a lot, create once per session
70 4 *UDP = \getprotobyname('udp');
71  
72 4 1;
73 __END__
« blib/lib/Net/DNSBL/MultiDaemon.pm ↑ Summary local/test.conf »