Branch Coverage

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


line true false branch
94 1 15 if (not grep({$_;} @$normal[0..7]) and grep({$normal->[$_] == $SIIT[not !$do][$_];} 8..11) == 4)
114 1212 16436 $_ > 255 ? :
1562 545 eval { do { @$address } } ? :
126 1 2106 $opt{'SIIT'} ? :
129 0 2107 unless (defined $address)
138 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) { }
155 38 86 $_ =~ /^0/u ? :
177 0 0 unless eval 'require Math::BigInt'
190 0 4 unless eval 'require Math::BigInt'
212 2 14 unless defined $rhs
238 116 1559 if grep {$_;} @octets[0..7]
257 0 2 unless eval 'require Math::BigInt'
259 2 0 unless $keep
260 0 2 $keep ? :
268 10 40 if $self->is_ipv4
279 238 34 if defined $rv
287 2 34 if ($self->is_ipv4)
289 1 1 $self->{'SIIT'} ? :
307 1051 34 if ($self->is_ipv4)
320 0 432 if $swapped
337 0 32 if $swapped
343 0 128 if ($answer > 4294967295)
344 0 0 if exists $r[$digit + 1]
364 0 16 if $swapped
370 0 64 if ($answer < 0)
372 0 0 if exists $r[$digit + 1]
391 0 0 if ($rv[$octet] > 255)
393 0 0 if $octet < 15
409 0 0 if (int($rv[$octet]) - $rv[$octet])
413 0 0 if $octet < 15
423 0 282 if $swapped
428 0 282 if $swapped
441 0 282 if $swapped
446 0 282 if $swapped
467 48 0 if ($self->is_ipv4)
500 0 174 unless @$x == @$y
503 21550 162 if ($x->[$i] eq $y->[$i]) { }
515 0 174 unless @$x == @$y
518 21550 162 if ($x->[$i] == $y->[$i]) { }
548 0 0 @_ ? :
549 0 0 if ($DIE_ON_ERROR) { }
553 0 0 if $^W
561 0 0 if $_[0] eq 'Net::IPAddress::Util'
577 0 0 if $^W
585 0 0 if $^W
592 0 0 if $^W
595 0 0 unless scalar @octets == 4
597 0 0 unless defined $_ and $_ >= 0 and $_ <= 255
603 0 0 if $^W
611 0 0 if $^W