Branch Coverage

blib/lib/IPv6/Address.pm
Criterion Covered Total %
branch 71 102 69.6


line true false branch
76 0 107 if $DEBUG
77 0 107 if $DEBUG
90 0 41 unless my $class = shift @_
91 0 41 unless my $ipv6_string = shift @_
93 0 41 unless defined $ipv6
94 0 41 unless defined $prefixlen
99 33 8 if ($nparts != 8)
103 33 134 $_ eq '::' ? :
254 0 9 unless defined(my $self = shift @_)
255 0 9 unless defined(my $other = shift @_)
256 9 0 if (ref $other eq '')
259 1 8 if $self->get_prefixlen > $other->get_prefixlen
260 7 1 if $self->get_masked_address_bitstr eq (generate_bitstr($self->get_prefixlen) & $other->get_bitstr)
289 3 0 if (defined $option{'ipv4'} and $option{'ipv4'})
296 1 53 if $option{'full'}
297 2 51 if $option{'nocompress'}
298 3 48 if $str eq '0:0:0:0:0:0:0:0'
302 34 147 if ($str =~ /:$zerostr$/) { }
9 138 elsif ($str =~ /:$zerostr:/) { }
4 134 elsif ($str =~ /^$zerostr:/) { }
422 5 1 shift(@_)->addr_string =~ /$patterns{$item}/i ? :
438 0 1 unless defined(my $ipv4 = shift())
461 0 1 unless my($self, $IPv4, $mask) = @_
468 15 17 if substr($binmask, $i, 1) == 1
493 0 20 unless my($self, $offset, $desired_length) = @_
499 2 18 if length $offset_bitstr > $to_replace_len
514 0 15 unless my($self, $offset) = @_
517 0 15 if $offset > $max_int
518 1 14 if $self->get_prefixlen == 0
522 0 14 if $DEBUG
525 14 0 $self->get_prefixlen >= 32 ? :
528 0 14 if $DEBUG
533 0 14 if $DEBUG
535 0 14 if $DEBUG
537 1 13 if $n > $max_int
542 0 13 if $DEBUG
543 0 13 unless length $bstr == 32
603 12 52 if $cmp != 0
627 0 6 unless defined(my $self = shift())
631 2 4 if ($remain > 0)
647 0 35 unless defined(my $class = shift())
648 0 35 unless defined(my $str = shift())
649 0 35 unless my($ip, $length_n) = $str =~ m[^(\d+\.\d+\.\d+\.\d+)/(\d+)$]
701 10 316 $_[0]->get_length_n == 0 ? :
714 0 82 unless defined(my $aton_str = inet_aton($_[0]))
724 0 45 unless defined(my $arg = shift())
726 0 45 if $DEBUG
731 16 3 $_[0]->position($_[1]) < $_[0]->get_length && $_[0]->position($_[1]) >= 0 ? :
735 0 10 unless defined(my $address = shift())
736 0 10 unless defined(my $blocks = shift())
741 10 2 if ($subnet->contains($address)) { }