Branch Coverage

blib/lib/Linux/Info/SysInfo.pm
Criterion Covered Total %
branch 41 58 70.6


line true false branch
217 1 1 ref $opts_ref eq 'HASH' && exists $opts_ref->{'raw_time'} && $opts_ref->{'raw_time'} =~ /^[01]$/ ? :
254 30 4 unless exists $self->{$attrib}
266 0 34 if (defined $self->{'attrib'})
292 10 0 $file->{'path'} ? :
293 0 10 unless open my $fh, '<', $filename
308 2 0 $file->{'path'} ? :
309 0 2 unless open my $fh, '<', $filename
313 2 88 if ($line =~ /^MemTotal:\s+(\d+ \w+)/) { }
2 86 elsif ($line =~ /^SwapTotal:\s+(\d+ \w+)/) { }
333 2 0 $file->{'path'} ? :
334 0 2 unless open my $fh, '<', $filename
352 32 832 if ($line =~ /$model_regex/ or $line =~ /$arm_regex/)
358 32 832 if ($line =~ /^physical\s+id\s*:\s*(\d+)/)
364 32 800 if ($line =~ /^core\s+id\s*:\s*(\d+)/)
369 32 768 if ($line =~ /^processor\s*:\s*\d+/)
374 0 768 if ($line =~ /^# processors\s*:\s*(\d+)/)
379 32 736 if ($line =~ /^flags\s+\:/)
381 30 2 if $self->get_cpu_flags
389 2 0 if ($value =~ /\slm\s/) { }
401 0 2 if ($value =~ /\sht\s/)
427 2 0 $file->{'path'} ? :
428 0 2 unless open my $fh, '<', $filename
433 4 2 if ($line =~ /^\s*(\w+):/)
450 2 0 $file->{'path'} ? :
451 0 2 unless open my $fh, '<', $filename
456 1 1 unless ($self->get_raw_time)
468 2 0 if $s >= 86400 and $d = sprintf('%i', $s / 86400)
469 2 0 if $s >= 3600 and $h = sprintf('%i', $s / 3600)
470 2 0 if $s >= 60 and $m = sprintf('%i', $s / 60)