Branch Coverage

blib/lib/Net/DNS/Paranoid.pm
Criterion Covered Total %
branch 55 76 72.3


line true false branch
14 0 1 @_ == 1 ? :
26 18 0 unless defined $start_time
27 18 0 unless defined $timeout
38 0 19 if $depth > 10
39 15 4 if $self->_bad_host($host)
42 0 4 if $host =~ /^\d+\.\d+\.\d+\.\d+$/
44 0 4 unless my $sock = $res->bgsend($host)
49 2 2 unless ($sock and $sock eq 'MOCK')
53 0 2 unless $nf
56 0 4 unless my $packet = $res->bgread($sock)
63 3 1 if ($rr->type eq 'A') { }
1 0 elsif ($rr->type eq 'CNAME') { }
64 1 2 if $self->_bad_host($rr->address)
73 2 1 if @addr
74 0 1 unless $cname
91 0 47 unless $$self{$list_name}
92 0 48 if (ref $rule eq 'CODE') { }
25 23 elsif (ref $rule) { }
93 0 0 if &$rule($host)
96 2 23 if $host =~ /$rule/
98 1 22 if $host eq $rule
108 0 22 if $self->_host_list_match('whitelisted_hosts', $host)
109 2 20 if $self->_host_list_match('blocked_hosts', $host)
110 1 19 if $host =~ /^localhost$/i or $host =~ /\s/i
121 0 19 if @parts > 4
126 4 41 unless /^\d+$/ or /^0x[a-f\d]+$/
128 14 27 if /^0/
132 0 15 if $overflow_flag
136 2 13 if (@parts == 1) { }
4 9 elsif (@parts == 2) { }
1 8 elsif (@parts == 3) { }
7 1 elsif (@parts == 4) { }
138 0 2 if $parts[0] > 4294967295
143 0 4 if $parts[0] > 255 or $parts[1] > 16777215
149 0 1 if $parts[0] > 255 or $parts[1] > 255 or $parts[2] > 65535
156 0 7 if $parts[0] > 255 or $parts[1] > 255 or $parts[2] > 255 or $parts[3] > 255
167 1 3 if ($haddr & 4278190080) == 0 or ($haddr & 4278190080) == 167772160 or ($haddr & 4278190080) == 2130706432 or ($haddr & 4293918720) == 2886729728 or ($haddr & 4294901760) == 2851995648 or ($haddr & 4294901760) == 3232235520 or ($haddr & 4294967040) == 3221225984 or ($haddr & 4294967040) == 3227017984 or $haddr == 4294967295 or ($haddr & 4026531840) == 3758096384
182 1 2 if $self->_host_list_match('blocked_hosts', $can_ip)