| line |
true |
false |
branch |
|
17
|
3 |
1 |
unless @nums == 4 |
|
19
|
1 |
0 |
unless /^\d{1,3}$/ and not /^0\d{1,2}$/ and $_ < 256 |
|
26
|
0 |
0 |
if grep(($_ > 255), @nums) |
|
32
|
3 |
113 |
if $ip eq "::" |
|
33
|
0 |
113 |
if $ip =~ /^:/ and not $ip =~ s/^::/:/ |
|
34
|
0 |
113 |
if $ip =~ /:$/ and not $ip =~ s/::$/:/ |
|
36
|
0 |
113 |
unless @nums <= 8 |
|
39
|
0 |
473 |
if $ipv4 |
|
40
|
370 |
103 |
if /^[a-fA-F\d]{1,4}$/ |
|
41
|
0 |
99 |
if $empty++ |
|
|
99 |
4 |
if $_ eq "" |
|
42
|
0 |
4 |
if $ipv4 = _pack_ipv4($_) |
|
45
|
0 |
109 |
if $ipv4 and @nums > 6 |
|
46
|
0 |
99 |
$ipv4 ? : |
|
|
99 |
10 |
if $empty |
|
58
|
38 |
7 |
if (my(@runs) = $ip =~ /((?:(?:^|:)(?:0000))+:?)/g) |
|
61
|
0 |
2 |
if length $max < length $_ |
|
79
|
6 |
27 |
unless $hi eq ($lo | $hi) |
|
80
|
4 |
23 |
unless $bits =~ /^(1*)0*$/ |
|
86
|
64 |
31 |
if ($ip =~ m[^(.+?)/(.+)$]) { } |
|
|
26 |
5 |
elsif ($ip =~ /^(.+?)-(.+)$/) { } |
|
88
|
4 |
60 |
unless my $addr = _pack($1) |
|
89
|
0 |
60 |
unless my $bits = _width2bits($mask, 128) |
|
94
|
0 |
26 |
unless my $lo = _pack($from) |
|
95
|
0 |
26 |
unless my $hi = _pack($to) |
|
105
|
4 |
86 |
unless my(@r) = $self->_encode($ip) |
|
115
|
0 |
34 |
if ($generic < 1 and $lo eq $hi) { } |
|
|
23 |
11 |
elsif ($generic < 2 and defined(my $w = _is_cidr($lo, $hi))) { } |