line |
true |
false |
branch |
23
|
3 |
0 |
unless @nums == 4 |
25
|
0 |
0 |
unless /^\d{1,3}$/ and $_ < 256 |
32
|
0 |
0 |
if grep(($_ > 255), @nums) |
38
|
3 |
16 |
if $ip eq '::' |
39
|
0 |
16 |
if $ip =~ /^:/ and not $ip =~ s/^::/:/ |
40
|
0 |
16 |
if $ip =~ /:$/ and not $ip =~ s/::$/:/ |
42
|
0 |
16 |
unless @nums <= 8 |
45
|
0 |
38 |
if $ipv4 |
46
|
22 |
16 |
if /^[a-fA-F\d]{1,4}$/ |
47
|
0 |
13 |
if $empty++ |
|
13 |
3 |
if $_ eq '' |
48
|
0 |
3 |
if $ipv4 = _pack_ipv4($_) |
51
|
0 |
13 |
if $ipv4 and @nums > 6 |
52
|
0 |
13 |
$ipv4 ? : |
|
13 |
0 |
if $empty |
64
|
19 |
2 |
if (my(@runs) = $ip =~ /((?:(?:^|:)(?:0000))+:?)/g) |
67
|
0 |
2 |
if length $max < length $_ |
85
|
0 |
18 |
unless $hi eq ($lo | $hi) |
86
|
1 |
17 |
unless $bits =~ /^(1*)0*$/ |
92
|
19 |
5 |
if ($ip =~ m[^(.+?)/(.+)$]) { } |
|
0 |
5 |
elsif ($ip =~ /^(.+?)-(.+)$/) { } |
94
|
3 |
16 |
unless my $addr = _pack($1) |
95
|
0 |
16 |
unless my $bits = _width2bits($mask, 128) |
100
|
0 |
0 |
unless my $lo = _pack($from) |
101
|
0 |
0 |
unless my $hi = _pack($to) |
111
|
3 |
16 |
unless my(@r) = $self->_encode($ip) |
121
|
0 |
19 |
if ($generic < 1 and $lo eq $hi) { } |
|
17 |
2 |
elsif ($generic < 2 and defined(my $w = _is_cidr($lo, $hi))) { } |