Branch Coverage

blib/lib/Net/CIDR/Set/IPv4.pm
Criterion Covered Total %
branch 27 32 84.3


line true false branch
23 7 61 unless @nums == 4
25 0 244 unless /^\d{1,3}$/ and $_ < 256
39 0 2 unless my $ip = shift()
42 1 1 unless $bits =~ /^1*0*$/
50 0 27 unless $hi eq ($lo | $hi)
51 3 24 unless $bits =~ /^(1*)0*$/
57 46 20 if ($ip =~ m[^(.+?)/(.+)$]) { }
10 10 elsif ($ip =~ /^(.+?)-(.+)$/) { }
59 7 39 unless my $addr = _pack($1)
61 37 2 $mask =~ /^\d+$/ ? :
1 38 unless my $bits = $mask =~ /^\d+$/ ? _width2bits($mask, 32) : _ip2bits(_pack($mask))
68 0 10 unless my $lo = _pack($1)
69 0 10 unless my $hi = _pack($2)
79 8 48 unless my(@r) = $self->_encode($ip)
89 3 29 if ($generic < 1 and $lo eq $hi) { }
24 5 elsif ($generic < 2 and defined(my $w = _is_cidr($lo, $hi))) { }