Branch Coverage

blib/lib/FTN/Addr.pm
Criterion Covered Total %
branch 39 78 50.0


line true false branch
24 10 20 $$t{'point'} ? :
35 0 14 unless defined $base_addr and ref $base_addr and $base_addr->isa('FTN::Addr')
37 9 20 if (ref $either) { }
44 0 29 if ($addr =~ m[(\w+)#([\d:/.]+)]) { }
6 23 elsif ($addr =~ m[([\d:/.]+)@(\w+)]) { }
0 23 elsif ($addr =~ /(\w+)\.(\d+\.\d+\.\d+\.\d+)/) { }
54 14 9 $base_addr ? :
58 17 12 if ($addr =~ m[^(\d+):(\d+)/(\d+)\.?(\d*)$]) { }
1 11 elsif ($addr =~ /^\.(\d+)$/) { }
7 4 elsif ($addr =~ /^(\d+)\.?(\d*)$/) { }
4 0 elsif ($addr =~ m[^(\d+)/(\d+)\.?(\d*)$]) { }
0 0 elsif ($addr =~ /^(\d+)\.(\d+)\.(\d+)\.(\d+)$/) { }
64 1 0 if ($base_addr) { }
73 7 0 if ($base_addr) { }
82 4 0 if ($base_addr) { }
100 0 29 unless (1 <= $$either{'zone'} and $$either{'zone'} <= 32767 and 1 <= $$either{'net'} and $$either{'net'} <= 32767 and -1 <= $$either{'node'} and $$either{'node'} <= 32767 and 0 <= $$either{'point'} and $$either{'point'} <= 32767 and length $$either{'domain'} <= 8 and index($$either{'domain'}, '.') == -1)
115 0 29 unless ref(my $inst = shift())
120 0 1 unless ref(my $inst = shift())
127 0 39 unless ref(my $inst = shift())
132 0 0 unless ref(my $inst = shift())
138 0 35 unless ref(my $inst = shift())
143 0 0 unless ref(my $inst = shift())
149 0 28 unless ref(my $inst = shift())
154 0 0 unless ref(my $inst = shift())
160 0 27 unless ref(my $inst = shift())
165 0 0 unless ref(my $inst = shift())
171 0 22 unless ref(my $inst = shift())
176 0 22 unless ref(my $inst = shift())
181 0 22 unless ref(my $inst = shift())
186 0 22 unless ref(my $inst = shift())
191 0 1 unless ref(my $inst = shift())
196 0 9 unless ref(my $inst = shift())
201 0 3 unless $_[1]->isa('FTN::Addr')
208 0 1 unless $_[1]->isa('FTN::Addr')
209 0 1 if ($_[2]) { }
210 0 0 unless lc $_[1]->domain cmp lc $_[0]->domain or $_[1]->zone <=> $_[0]->zone or $_[1]->net <=> $_[0]->net or $_[1]->node <=> $_[0]->node
213 0 0 unless lc $_[0]->domain cmp lc $_[1]->domain or $_[0]->zone <=> $_[1]->zone or $_[0]->net <=> $_[1]->net or $_[0]->node <=> $_[1]->node
219 0 1 if ref(my $class = shift())
220 0 1 unless $_[0]->isa('FTN::Addr')