Branch Coverage

blib/lib/Net/IPAM/IP.pm
Criterion Covered Total %
branch 54 60 90.0


line true false branch
75 49 130 if (index($input, ":") < 0)
77 17 32 unless defined $n
85 33 97 if (index($input, ".") >= 0)
89 16 17 unless $ip4m6 =~ s/^::ffff://i
92 1 16 unless defined $n
102 47 50 unless defined $n
126 1 27 unless defined $n
128 13 14 if (length $n == 4) { }
12 2 elsif (length $n == 16) { }
136 2 10 if (index($n, "\0\0\0\0\0\0\0\0\0\0\377\377") == 0)
192 1 23 unless defined $name
194 22 1 unless defined $error_cb
197 20 3 if $name =~ /$ip_rx/
203 2 1 if ($err)
206 2 0 if $err == -2
216 2 2 if ($ai->{'family'} == 2) { }
293 11 61 if exists $_[0]{'as_string'}
298 34 27 if ($_[0]{'version'} == 4)
310 26 1 if (index($str, ".") < 0)
342 3 4 unless defined $n_plus1
361 3 3 unless defined $n_minus1
377 1 4 if exists $_[0]{'expand'}
381 1 3 if ($_[0]{'version'} == 6)
405 1 4 if exists $_[0]{'reverse'}
412 1 3 if ($_[0]{'version'} == 6)
447 1 0 unless defined $error_cb
450 1 0 if ($self->{'version'} == 4) { }
459 0 1 if ($err)
462 0 0 if $err == -2
544 2 8 if (defined Socket::inet_pton(2, "010.0.0.1") or defined Socket::inet_pton(2, "10.000.0.1") or defined Socket::inet_pton(10, "cafe:::") or defined Socket::inet_pton(10, "cafe::1::") or defined Socket::inet_pton(10, "cafe::1:") or defined Socket::inet_pton(10, ":cafe::") or not defined Socket::inet_pton(10, "caFe::") or not defined Socket::inet_pton(10, "::") or not defined Socket::inet_pton(2, "0.0.0.0"))