Branch Coverage

blib/lib/Net/Routing.pm
Criterion Covered Total %
branch 8 64 12.5


line true false branch
64 6 0 if ($^O eq 'linux') { }
0 0 elsif ($^O eq 'freebsd') { }
0 0 elsif ($^O eq 'netbsd') { }
0 0 elsif ($^O eq 'darwin') { }
98 0 4 if ($@)
106 3 1 unless my $routes = $self->get
119 0 0 if ($target eq 'all') { }
0 0 elsif ($target eq 'default') { }
0 0 elsif ($target =~ /^[0-9\.]+$/) { }
0 0 elsif ($target =~ m[^[0-9a-f:/]+$]i) { }
129 0 0 unless ($@)
137 0 0 unless ($@)
157 0 0 if ($target_type eq 'ipv4') { }
0 0 elsif ($target_type eq 'ipv6') { }
164 0 0 unless my $routes = $self->_routing_module_get
165 0 0 if ($target_type eq 'all')
173 0 0 if ($target_type eq 'default') { }
0 0 elsif ($target_type eq 'interface') { }
0 0 elsif ($target_type eq 'ipv4' or $target_type eq 'ipv6') { }
174 0 0 if ($route->{'default'})
180 0 0 if ($route->{'interface'} eq $target)
186 0 0 if ($route->{'route'} and $route->{'route'} ne '0.0.0.0/0' and $route->{'route'} ne '::/0')
193 0 0 if (not $@ and $r)
201 0 0 if (@routes == 0 and $target_type eq 'ipv4' || $target_type eq 'ipv6')
205 0 0 if ($route->{'default'})
226 0 0 if ($@)
231 0 0 unless (defined $routing)
236 0 0 unless (defined $routes)
255 0 0 if ($route->{'local'}) { }
0 0 elsif ($route->{'default'}) { }
273 7 65 exists $route->{'default'} ? :
57 15 exists $route->{'local'} ? :