Branch Coverage

blib/lib/Sys/Info/Driver/Linux/OS/Distribution.pm
Criterion Covered Total %
branch 34 94 36.1


line true false branch
37 0 2 if (@_)
38 0 0 if @_ % 2
73 0 1 unless exists $slot->{'manufacturer'}
79 0 2 if $self->{'RESULTS'}
92 2 0 if $distro
102 0 0 if (-f $file and not -l $file)
117 0 0 unless ($dist_id or $self->name)
120 0 0 if $release
128 0 2 exists $slot->{'version_match'} ? :
132 0 2 if $slot->{'release'}
148 2 0 if (my $dn = $self->name) { }
154 2 0 unless $dn =~ /Linux/imsx
166 2 0 exists $slot->{'edition'} ? :
168 0 2 unless ($edition)
169 0 0 if ($version and not $version =~ /[0-9]/msx) { }
170 0 0 if ($name =~ /debian/imsx)
172 0 0 if (my $test = $Sys::Info::Driver::Linux::OS::Distribution::CONF{'debian'}{'vfix'}{lc $buf[0]})
180 0 0 if ($slot->{'use_codename_for_edition'} and $self->{'DISTRIB_CODENAME'})
184 0 0 unless $cn =~ /[0-9]/msx
196 2 0 if (-e {cpuinfo => '/proc/cpuinfo', fstab => '/etc/fstab', issue => '/etc/issue', loadavg => '/proc/loadavg', meminfo => '/proc/meminfo', resolv => '/etc/resolv.conf', swaps => '/proc/swaps', timezone => '/etc/timezone', uptime => '/proc/uptime', version => '/proc/version'}->{'version'} and -f _)
210 0 2 unless $build_date
212 2 0 if ($str =~ / \A Linux \s+ version \s (.+?) \s [(] .+? \@ .+? [)] (.*?) \z /imsx or $str =~ / \A linux \s+ [a-zA-Z0-9.]+ \s+ ([a-zA-Z0-9.]+)? /imsx)
214 2 0 if ($distro = $self->trim($2))
215 0 2 if ($distro =~ / \s\((.+?)\)\) \z /msx)
221 2 0 if not $distro or $distro =~ /\(gcc/msx
224 2 0 if $build_date
225 2 0 $build_date ? :
252 4 0 if ($rfile) { }
256 4 0 if $info
261 0 0 if (-d $dir)
263 0 0 m[$dir/(.*)]msx ? :
266 0 0 if $rv
269 0 0 if (my(@files) = glob($self->{'etc_dir'} . '/*release'))
273 0 0 if ($real)
282 0 0 unless $release
287 0 0 if $codename
296 0 0 if ($self->{'DISTRIB_ID'} and $self->{'DISTRIB_ID'} eq 'redhat' and $self->{'DISTRIB_NAME'} and index($self->{'DISTRIB_NAME'}, 'CentOS') != -1)
304 0 0 if $self->{$field}
317 0 6 unless $FH->open($file, '<')
319 0 6 unless $FH->close
322 2 2 $self->{'pattern'} =~ / \A DISTRIB_RELEASE \b /msx ? :
2 4 $self->{'pattern'} =~ / \A DISTRIB_ID \b /msx ? :
327 0 14 unless $line
331 4 10 if ($info) { }
2 8 elsif ($new_pattern) { }
338 0 2 if ($info2)
345 4 2 if ($rv)