Branch Coverage

blib/lib/FTN/Addr.pm
Criterion Covered Total %
branch 99 150 66.0


line true false branch
163 0 37 unless (defined $addr)
166 0 0 unless wantarray
173 0 37 if ($addr =~ /^($domain_re)\.(\d{1,5})\.(\d{1,5})\.(-?\d{1,5})\.(-?\d{1,5})$/) { }
0 37 elsif ($addr =~ m[^($domain_re)#(\d{1,5}):(\d{1,5})/(-?\d{1,5})\.(-?\d{1,5})$]) { }
21 16 elsif ($addr =~ m[^(\d{1,5}):(\d{1,5})/(-?\d{1,5})(?:\.(-?\d{1,5}))?(?:@($domain_re))?$]) { }
204 13 3 ref $either ? :
206 0 16 unless ($base and ref $base and builtin::blessed($base) and $base->isa("FTN::Addr"))
212 0 0 unless wantarray
217 4 12 if ($addr =~ m[^(\d{1,5})/(-?\d{1,5})(?:\.(-?\d{1,5}))?$]) { }
11 1 elsif ($addr =~ /^(-?\d{1,5})(?:\.(-?\d{1,5}))?$/) { }
1 0 elsif ($addr =~ /^\.(-?\d{1,5})$/) { }
261 0 0 unless wantarray
276 0 185 if (my $error = &$sub($val))
279 0 0 unless wantarray
286 0 37 if ($new{'node'} == -1 and $new{'point'} != 0)
290 0 0 unless wantarray
296 0 37 if ($new{'point'} == -1 and $new{'node'} <= 0)
300 0 0 unless wantarray
309 0 42 unless defined $_[0]
312 1 41 unless $_[0] =~ /^$domain_re$/
320 0 44 unless defined $_[0]
323 2 42 unless $_[0] =~ /^\d{1,5}$/
326 1 41 unless 1 <= $_[0]
329 1 40 unless $_[0] <= 32767
337 0 44 unless defined $_[0]
340 2 42 unless $_[0] =~ /^\d{1,5}$/
343 1 41 unless 1 <= $_[0]
346 1 40 unless $_[0] <= 32767
354 0 46 unless defined $_[0]
357 0 46 unless $_[0] =~ /^-?(?:\d{1,5})$/
360 1 45 unless -1 <= $_[0]
363 1 44 unless $_[0] <= 32767
372 0 48 unless defined $_[0]
375 0 48 unless $_[0] =~ /^-?(?:\d{1,5})$/
378 1 47 unless -1 <= $_[0]
381 1 46 unless $_[0] <= 32767
394 0 2 unless ref(my $inst = shift())
413 0 64 unless ref(my $inst = shift())
432 0 5 unless ref(my $inst = shift())
437 1 4 if (my $error = _validate_domain($value))
457 0 62 unless ref(my $inst = shift())
476 0 7 unless ref(my $inst = shift())
481 4 3 if (my $error = _validate_zone($value))
501 0 58 unless ref(my $inst = shift())
520 0 7 unless ref(my $inst = shift())
525 4 3 if (my $error = _validate_net($value))
545 0 50 unless ref(my $inst = shift())
564 0 9 unless ref(my $inst = shift())
569 2 7 if (my $error = _validate_node($value))
574 1 6 if $value == -1 and $inst->point != 0
591 0 49 unless ref(my $inst = shift())
616 0 11 unless ref(my $inst = shift())
621 2 9 if (my $error = _validate_point($value))
626 2 7 if $value == -1 and $inst->node <= 0
647 0 24 unless ref(my $inst = shift())
653 23 1 unless exists $inst->{'full4d'}
667 0 24 unless ref(my $inst = shift())
674 6 17 $inst->{'point'} ? :
23 1 unless exists $inst->{'short4d'}
688 0 24 unless ref(my $inst = shift())
694 23 1 unless exists $inst->{'full5d'}
708 0 24 unless ref(my $inst = shift())
716 6 17 $inst->{'point'} ? :
23 1 unless exists $inst->{'short5d'}
730 0 5 unless ref(my $inst = shift())
736 4 1 unless exists $inst->{'fqfa'}
750 0 13 unless ref(my $inst = shift())
756 12 1 unless exists $inst->{'brake_style'}
789 0 5 unless $_[1] and ref $_[1] and builtin::blessed($_[1]) and $_[1]->isa("FTN::Addr")
794 5 0 if $_[0]->domain eq $_[1]->domain and $_[0]->zone == $_[1]->zone and $_[0]->net == $_[1]->net and $_[0]->node == $_[1]->node
803 0 2 unless $_[1] and ref $_[1] and builtin::blessed($_[1]) and $_[1]->isa("FTN::Addr")
810 0 2 if $_[2]
813 1 0 unless $_[$i]->domain cmp $_[$j]->domain or $_[$i]->zone <=> $_[$j]->zone or $_[$i]->net <=> $_[$j]->net or $_[$i]->node <=> $_[$j]->node
821 0 1 if ref(my $class = shift())
825 0 1 unless $_[0] and ref $_[0] and builtin::blessed($_[0]) and $_[0]->isa("FTN::Addr")