Branch Coverage

blib/lib/Net/Routing/NetBSD.pm
Criterion Covered Total %
branch 28 40 70.0


line true false branch
41 6 2 if (defined $route and defined $gateway and defined $interface)
45 1 5 if ($route eq 'default')
48 1 5 if ($gateway =~ /^link/)
53 1 5 unless ($gateway =~ /^[0-9\.]+$/ and $route =~ m[^[0-9\.]+(?:/\d+)?$])
66 0 5 if ($@)
80 1 4 if ($route eq '0.0.0.0/0')
86 1 4 if ($gateway eq '0.0.0.0')
91 0 5 unless ($route{'route'} =~ m[/\d+$])
96 5 0 unless (exists $cache{$id})
131 3 1 if (defined $route and defined $gateway and defined $interface)
133 2 1 if ($gateway =~ /^link/ or $gateway eq '::1')
136 0 3 if ($route eq 'default')
141 0 3 if ($gateway =~ /^[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}:[a-f0-9]{2}$/)
148 0 0 unless (exists $cache{$id})
155 1 2 unless ($route =~ m[^[0-9a-f:/]+$]i and $gateway =~ m[^[0-9a-f:/]+$]i)
166 0 2 if ($@)
180 0 2 if ($route eq '::/0')
186 2 0 if ($gateway eq '::')
191 0 2 unless ($route{'route'} =~ m[/\d+$])
196 2 0 unless (exists $cache{$id})