Branch Coverage

blib/lib/Net/CIDR/Set/IPv6.pm
Criterion Covered Total %
branch 36 58 62.0


line true false branch
19 0 0 unless @nums == 4
21 0 0 unless /\A$DEC\z/ and not /\A0[1-9]+/
28 0 0 if grep(($_ > 255), @nums)
34 3 109 if $ip eq "::"
35 0 109 if $ip =~ /\A:/ and not $ip =~ s/\A::/:/
36 0 109 if $ip =~ /:\z/ and not $ip =~ s/::\z/:/
38 0 109 unless @nums <= 8
41 0 469 if $ipv4
42 370 99 if /\A[A-Fa-f0-9]{1,4}\z/
43 0 99 if $empty++
99 0 if $_ eq ""
44 0 0 if $ipv4 = _pack_ipv4($_)
47 0 109 if $ipv4 and @nums > 6
48 0 99 $ipv4 ? :
99 10 if $empty
60 38 7 if (my(@runs) = $ip =~ /((?:(?:\A|:)(?:0000))+:?)/g)
63 0 2 if length $max < length $_
81 6 27 unless $hi eq ($lo | $hi)
82 4 23 unless $bits =~ /\A(1*)0*\z/
88 60 36 if ($ip =~ m[\A([0-9A-Fa-f:]+)/(0|[1-9][0-9]*)\z]) { }
26 10 elsif ($ip =~ /\A([0-9A-Fa-f:]+)-([0-9A-Fa-f:]+)\z/) { }
2 8 elsif ($ip =~ /\A[0-9A-Fa-f:]+\z/) { }
90 0 60 unless my $addr = _pack($1)
91 0 60 unless my $bits = _width2bits($mask, 128)
96 0 26 unless my $lo = _pack($from)
97 0 26 unless my $hi = _pack($to)
110 8 86 unless my(@r) = $self->_encode($ip)
120 0 34 if ($generic < 1 and $lo eq $hi) { }
23 11 elsif ($generic < 2 and defined(my $w = _is_cidr($lo, $hi))) { }