Branch Coverage

blib/lib/Net/IPAddress/Util.pm
Criterion Covered Total %
branch 58 116 50.0


line true false branch
92 1 15 if (not grep({$_;} @$normal[0..7]) and grep({$normal->[$_] == $SIIT[not !$do][$_];} 8..11) == 4)
112 1212 16436 $_ > 255 ? :
1562 545 eval { do { @$address } } ? :
124 1 2106 $opt{'SIIT'} ? :
127 0 2107 unless (defined $address)
136 950 1157 if (ref $address eq 'ARRAY' and @$address == 16) { }
612 545 elsif (ref $address eq 'ARRAY' and @$address == 4) { }
494 51 elsif (ref $address and eval { do { $address->isa('Net::IPAddress::Util') } }) { }
31 20 elsif ($address =~ /$fourish/u or $address =~ /$siit_fourish/u) { }
0 20 elsif ($opt{'promote'} and $address =~ /$numberish/u and (0 <= $address and $address <= 4294967295)) { }
0 20 elsif ("$address" =~ /$normalish/u) { }
4 16 elsif ($address =~ /$numberish/u) { }
16 0 elsif ($address =~ /$sixish/u and scalar grep({/::/ou;} split(/[[:alnum:]]+/u, $address, 0)) == 1 || scalar grep({/[[:alnum:]]+/u;} split(/:/u, $address, 0)) == 8) { }
0 0 elsif (length $address == 16) { }
153 38 86 $_ =~ /^0/u ? :
175 0 0 unless eval 'require Math::BigInt'
188 0 4 unless eval 'require Math::BigInt'
210 2 14 unless defined $rhs
236 116 1559 if grep {$_;} @octets[0..7]
255 0 2 unless eval 'require Math::BigInt'
257 2 0 unless $keep
258 0 2 $keep ? :
266 10 40 if $self->is_ipv4
277 238 34 if defined $rv
285 2 34 if ($self->is_ipv4)
287 1 1 $self->{'SIIT'} ? :
305 1051 34 if ($self->is_ipv4)
318 0 432 if $swapped
335 0 32 if $swapped
341 0 128 if ($answer > 4294967295)
342 0 0 if exists $r[$digit + 1]
362 0 16 if $swapped
368 0 64 if ($answer < 0)
370 0 0 if exists $r[$digit + 1]
389 0 0 if ($rv[$octet] > 255)
391 0 0 if $octet < 15
407 0 0 if (int($rv[$octet]) - $rv[$octet])
411 0 0 if $octet < 15
421 0 282 if $swapped
426 0 282 if $swapped
439 0 282 if $swapped
444 0 282 if $swapped
465 48 0 if ($self->is_ipv4)
498 0 174 unless @$x == @$y
501 21550 162 if ($x->[$i] eq $y->[$i]) { }
513 0 174 unless @$x == @$y
516 21550 162 if ($x->[$i] == $y->[$i]) { }
546 0 0 @_ ? :
547 0 0 if ($DIE_ON_ERROR) { }
551 0 0 if $^W
559 0 0 if $_[0] eq 'Net::IPAddress::Util'
575 0 0 if $^W
583 0 0 if $^W
590 0 0 if $^W
593 0 0 unless scalar @octets == 4
595 0 0 unless defined $_ and $_ >= 0 and $_ <= 255
601 0 0 if $^W
609 0 0 if $^W