Branch Coverage

blib/lib/Net/IPAM/IP.pm
Criterion Covered Total %
branch 52 58 89.6


line true false branch
73 49 139 if (index($input, ":") < 0)
75 17 32 unless defined $n
83 40 99 if (index($input, ".") >= 0)
85 16 24 unless $input =~ /^::ffff:/m
90 54 69 unless defined $n
114 1 29 unless defined $n
116 11 18 if (length $n == 4) { }
16 2 elsif (length $n == 16) { }
171 1 23 unless defined $name
173 22 1 unless defined $error_cb
176 20 3 if $name =~ /$ip_rx/
182 2 1 if ($err)
185 2 0 if $err == -2
195 2 2 if ($ai->{'family'} == 2) { }
270 11 63 if exists $_[0]{'as_string'}
275 26 37 if ($_[0]{'version'} == 4)
285 8 29 if (substr($n, 0, 12) eq "\0\0\0\0\0\0\0\0\0\0\377\377")
293 28 1 if (index($str, ".") < 0)
325 2 5 unless defined $n_plus1
344 2 4 unless defined $n_minus1
360 1 4 if exists $_[0]{'expand'}
364 2 2 if ($_[0]{'version'} == 6)
388 1 4 if exists $_[0]{'reverse'}
395 3 1 if ($_[0]{'version'} == 6)
430 1 0 unless defined $error_cb
433 1 0 if ($self->{'version'} == 4) { }
442 0 1 if ($err)
445 0 0 if $err == -2
542 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"))