Branch Coverage

blib/lib/FTN/Addr.pm
Criterion Covered Total %
branch 74 126 58.7


line true false branch
116 0 35 unless defined $addr
120 0 35 if ($addr =~ /^($domain_re)\.(\d+)\.(\d+)\.(-?\d+)\.(-?\d+)$/) { }
0 35 elsif ($addr =~ m[^($domain_re)#(\d+):(\d+)/(-?\d+)\.(-?\d+)$]) { }
21 14 elsif ($addr =~ m[^(\d+):(\d+)/(-?\d+)(?:\.(-?\d+))?(?:@($domain_re))?$]) { }
148 12 2 ref $either ? :
151 0 14 unless $base and ref $base and &Scalar::Util::blessed($base) and $base->isa('FTN::Addr')
156 4 10 if ($addr =~ m[^(\d+)/(-?\d+)(?:\.(-?\d+))?$]) { }
9 1 elsif ($addr =~ /^(-?\d+)(?:\.(-?\d+))?$/) { }
1 0 elsif ($addr =~ /^\.(-?\d+)$/) { }
210 0 35 unless _validate_domain($new{'domain'}) and _validate_zone($new{'zone'}) and _validate_net($new{'net'}) and _validate_node($new{'node'}) and _validate_point($new{'point'}) and $new{'node'} != -1 || $new{'point'} == 0 and $new{'node'} > 0 || $new{'point'} != -1
217 38 0 if defined $_[0]
225 37 0 if defined $_[0] and 1 <= $_[0]
230 37 0 if defined $_[0] and 1 <= $_[0]
235 37 0 if defined $_[0] and -1 <= $_[0]
240 38 0 if defined $_[0] and -1 <= $_[0]
252 0 1 unless ref(my $inst = shift())
272 0 61 unless ref(my $inst = shift())
276 1 60 @_ ? :
280 0 3 unless ref(my $inst = shift())
284 0 0 defined $value ? :
0 3 unless _validate_domain($value)
304 0 59 unless ref(my $inst = shift())
308 1 58 @_ ? :
312 0 2 unless ref(my $inst = shift())
316 0 0 defined $value ? :
0 2 unless _validate_zone($value)
336 0 56 unless ref(my $inst = shift())
340 2 54 @_ ? :
344 0 2 unless ref(my $inst = shift())
348 0 0 defined $value ? :
0 2 unless _validate_net($value)
368 0 47 unless ref(my $inst = shift())
372 2 45 @_ ? :
376 0 2 unless ref(my $inst = shift())
380 0 0 defined $value ? :
0 2 unless _validate_node($value)
400 0 46 unless ref(my $inst = shift())
404 2 44 @_ ? :
408 0 3 unless ref(my $inst = shift())
412 0 0 defined $value ? :
0 3 unless _validate_point($value)
430 0 23 unless ref(my $inst = shift())
433 22 1 unless exists $inst->{'full4d'}
445 0 23 unless ref(my $inst = shift())
450 6 16 $inst->{'point'} ? :
22 1 unless exists $inst->{'short4d'}
462 0 23 unless ref(my $inst = shift())
465 22 1 unless exists $inst->{'full5d'}
477 0 23 unless ref(my $inst = shift())
483 6 16 $inst->{'point'} ? :
22 1 unless exists $inst->{'short5d'}
495 0 4 unless ref(my $inst = shift())
498 3 1 unless exists $inst->{'fqfa'}
510 0 12 unless ref(my $inst = shift())
513 11 1 unless exists $inst->{'brake_style'}
540 0 5 unless $_[1] and ref $_[1] and &Scalar::Util::blessed($_[1]) and $_[1]->isa('FTN::Addr')
545 5 0 if $_[0]->domain eq $_[1]->domain and $_[0]->zone == $_[1]->zone and $_[0]->net == $_[1]->net and $_[0]->node == $_[1]->node
554 0 2 unless $_[1] and ref $_[1] and &Scalar::Util::blessed($_[1]) and $_[1]->isa('FTN::Addr')
559 0 2 if ($_[2]) { }
560 0 0 unless $_[1]->domain cmp $_[0]->domain or $_[1]->zone <=> $_[0]->zone or $_[1]->net <=> $_[0]->net or $_[1]->node <=> $_[0]->node
566 1 0 unless $_[0]->domain cmp $_[1]->domain or $_[0]->zone <=> $_[1]->zone or $_[0]->net <=> $_[1]->net or $_[0]->node <=> $_[1]->node
575 0 1 if ref(my $class = shift())
578 0 1 unless $_[0] and ref $_[0] and &Scalar::Util::blessed($_[0]) and $_[0]->isa('FTN::Addr')