Branch Coverage

blib/lib/Cache/RamDisk/Functions.pm
Criterion Covered Total %
branch 18 64 28.1


line true false branch
278 0 1 if ($<)
284 0 1 unless $$args{'Base'}
285 1 0 unless $$args{'Size'}
286 0 1 unless $$args{'INodes'}
287 1 0 unless $$args{'ShMem'}
288 1 0 unless $$args{'User'}
289 1 0 unless $$args{'Group'}
290 0 1 unless ($$args{'Keys'})
294 0 1 unless $$args{'SIndex'}
298 3 0 unless (/\W/ or /^__.*__$/)
300 0 3 unless $$args{'SIndex'}{$_}
314 1 0 if grep 'initrd', @stat
326 0 1 if (grep /$rdpath/, @mount and system('umount ' . $rdpath) < 0)
330 0 1 if (-e "/dev/ram$i") { }
331 0 0 if (system('mke2fs -q -N' . $$args{'INodes'} . " /dev/ram$i") < 0 or system("mkdir -p $rdpath") < 0 or system "mount /dev/ram$i $rdpath")
337 0 0 unless $i
342 0 0 unless (mkdir "$rdpath/$_")
346 0 0 if (system('chown -R ' . $$args{'User'} . '.' . $$args{'Group'} . " $rdpath/$_") < 0)
355 0 0 if $$ret{'Blocks'} > $$args{'Size'} * $$ret{'BSize'}
372 0 0 unless (eval { do { $stie = tie(%cache, 'IPC::Shareable', $$args{'ShMem'}, {'create', 1, 'mode', 438, 'size', 65536, 'exclusive', 0, 'destroy', 0}) } })
393 0 0 unless (eval { do { $stie = tie($baz, 'IPC::Shareable', $ftoks[$i], {'create', 1, 'mode', 438, 'size', $$args{'SIndex'}{$keys[$i]} * 1024, 'exclusive', 0, 'destroy', 0}) } })
411 1 0 unless defined &c_status::new
426 1 0 unless (eval { do { $tie = tie(%cache, 'IPC::Shareable', $shkey, {'create', 0, 'destroy', 0, 'exclusive', 0, 'mode', 438, 'size', 65536}) } })
443 0 0 unless (/^__.*__/)
467 0 0 unless eval { do { $tie = tie(%cache, 'IPC::Shareable', $shkey, {'create', 0, 'destroy', 0, 'exclusive', 0, 'mode', 438, 'size', 65536}) } }
474 0 0 unless (eval { do { $xtie = tie($idx, 'IPC::Shareable', $key[2], {'create', 0, 'destroy', 0, 'exclusive', 0, 'mode', 438, 'size', $key[3] * 1024}) } })
481 0 0 unless ($ikey =~ /^__\w+__$/)
486 0 0 unless defined $$obj{$rd}
502 0 1 if ($<)
513 1 0 unless (eval { do { $tie = tie(%cache, 'IPC::Shareable', $shkey, {'create', 0, 'destroy', 0, 'exclusive', 0, 'mode', 438, 'size', 65536}) } })
526 0 0 if /^__.*__$/
529 0 0 unless (eval { do { $ttie = tie($idx, 'IPC::Shareable', $key[2], {'create', 0, 'destroy', 0, 'exclusive', 0, 'mode', 438, 'size', $key[3] * 1024}) } })