Branch Coverage

blib/lib/Paranoid/Network.pm
Criterion Covered Total %
branch 32 42 76.1


line true false branch
89 15 0 if (defined $ip)
95 15 0 if (has_ipv6() or $] >= 5.012) { }
98 7 1 $ip =~ /^@{[\undef];}$/so ? :
7 8 $ip =~ /^@{[\undef];}$/so ? :
106 0 0 if $ip =~ m[^@{[qr/(?:(?:25[0-5]|2[0-4][0-9]|1?\d\d?)\.){3}(?:25[0-5]|2[0-4][0-9]|1?\d\d?)/s];}$]so
111 14 1 if (defined $ip and defined $family)
115 10 10 $family == 2 ? :
124 6 7 $family == 2 ? :
10 3 if ($family == 2 ? ipv4NetIntersect($ip, $_) : ipv6NetIntersect($ip, $_))
157 4 1 if (defined $host and $host =~ m[^@{[qr/(?:[a-z0-9][a-z0-9\-]*)(?:\.[a-z0-9][a-z0-9\-]*)*\.?/s];}$]so)
161 5 0 if defined $_
164 3 1 if (@domains)
166 3 1 if ($host =~ /^(?:[\w\-]+\.)*\Q$domain\E$/is)
194 0 10 unless defined $string
202 28 0 if defined inet_aton($tmp[0])
207 10 0 if (has_ipv6() or $] >= "5.012")
218 15 30 if defined inet_pton(10, $tmp[0])
249 6 0 if (defined $target and defined $dest) { }
250 3 3 if ($target =~ /^(?:@{[\undef];}|@{[\undef];})$/s) { }
2 1 elsif ($target =~ /^(?:@{[\undef];}|@{[\undef];})$/is) { }
254 2 0 if has_ipv6() or $] >= "5.012"