Branch Coverage

blib/lib/Net/IPAddress/Util.pm
Criterion Covered Total %
branch 45 114 39.4


line true false branch
58 0 0 if (not grep({$_;} @$old[0..9]) and $old->[10] == 255 and $old->[11] == 255)
63 0 0 if ($WARN_ON_REPAIR > 1) { }
0 0 elsif ($WARN_ON_REPAIR) { }
87 0 1053 unless (defined $address)
91 475 578 if (ref $address eq 'ARRAY' and @$address == 16) { }
306 272 elsif (ref $address eq 'ARRAY' and @$address == 4) { }
247 25 elsif (ref $address and eval { do { $address->isa('Net::IPAddress::Util') } }) { }
15 10 elsif ($address =~ /$fourish/) { }
0 10 elsif ($REPAIR_V3_FORMAT and $address =~ /$broken_fourish/) { }
1 9 elsif ($PROMOTE_N32 and $address =~ /$numberish/ and $address >= 0 and $address <= 4294967295) { }
0 9 elsif ("$address" =~ /$normalish/) { }
1 8 elsif ($address =~ /$numberish/) { }
8 0 elsif ($address =~ /$sixish/ and scalar grep({/::/o;} split(/[[:alnum:]]+/, $address, 0)) == 1 || scalar grep({/[[:alnum:]]+/;} split(/:/, $address, 0)) == 8) { }
0 0 elsif (length $address == 16) { }
110 0 0 if ($WARN_ON_REPAIR > 1) { }
0 0 elsif ($WARN_ON_REPAIR) { }
135 0 0 unless eval 'require Math::BigInt'
148 0 1 unless eval 'require Math::BigInt'
170 1 7 unless defined $rhs
187 0 1053 if ($REPAIR_V3_FORMAT)
219 0 1 unless eval 'require Math::BigInt'
226 1 0 unless $keep
227 0 1 $keep ? :
244 119 17 if defined $rv
252 1 17 if ($self->is_ipv4)
269 525 17 if ($self->is_ipv4)
282 0 216 if $swapped
299 0 16 if $swapped
305 0 64 if ($answer > 4294967295)
306 0 0 if exists $r[$digit + 1]
324 0 8 if $swapped
330 0 32 if ($answer < 0)
332 0 0 if exists $r[$digit + 1]
349 0 0 if ($rv[$octet] > 255)
351 0 0 if $octet < 15
367 0 0 if (int($rv[$octet]) - $rv[$octet])
371 0 0 if $octet < 15
381 0 141 if $swapped
386 0 141 if $swapped
399 0 141 if $swapped
404 0 141 if $swapped
425 24 0 if ($self->is_ipv4)
458 0 87 unless @$x == @$y
461 10775 81 if ($x->[$i] eq $y->[$i]) { }
473 0 87 unless @$x == @$y
476 10775 81 if ($x->[$i] == $y->[$i]) { }
506 0 0 @_ ? :
507 0 0 if ($DIE_ON_ERROR) { }
511 0 0 if $^W
519 0 0 if $_[0] eq 'Net::IPAddress::Util'
535 0 0 if $^W
543 0 0 if $^W
550 0 0 if $^W
553 0 0 unless scalar @octets == 4
555 0 0 unless defined $_ and $_ >= 0 and $_ <= 255
561 0 0 if $^W
569 0 0 if $^W