Branch Coverage

blib/lib/Sys/HostIP.pm
Criterion Covered Total %
branch 37 50 74.0


line true false branch
18 0 41 unless my $class = shift()
25 36 5 $IS_WIN ? :
35 7 4 unless (ref $self)
40 1 3 if $path
49 16 14 if (not ref $self) { }
55 25 5 if ($IS_WIN) { }
57 24 1 scalar @if_keys != 0 ? :
64 0 4 if ($if_info->{$key} eq '127.0.0.1')
74 0 1 if $lo_found
83 14 14 unless (ref $self)
93 14 14 unless (ref $self)
111 10 0 if ($^O =~ /(?: linux|openbsd|freebsd|netbsd|solaris|darwin )/imsx) { }
0 0 elsif ($^O eq 'aix') { }
0 0 elsif ($^O eq 'irix') { }
0 0 elsif ($^O eq 'dec_osf') { }
112 0 10 -f '/sbin/ifconfig' ? :
130 61 9 $IS_WIN ? :
136 2 68 if values %$interface_info == 0
222 48 16 if ($line =~ /^\s+/x and $interface) { }
16 0 elsif (($interface) = $line =~ /^(?:\d+\:\s){0,1}(\w+(?:\d)?(?:\.\d+)?(?:\:\d+)?)/x) { }
239 16 0 if (my($ip) = $if_info{$key} =~ /inet\s(?:addr\:)?(\d+(?:\.\d+){3})/x) { }
291 72 1806 if ($line =~ /Windows/msx) { }
570 1236 elsif ($line =~ /^\s$/msx) { }
102 1134 elsif ($line =~ /$regexes{'address'}/ and defined $interface) { }
114 1020 elsif ($line =~ /$regexes{'adapter'}/) { }