Branch Coverage

lib/Tie/FileLRUCache.pm
Criterion Covered Total %
branch 80 112 71.4


line true false branch
183 1 12 unless (defined $parms)
232 1 47 unless (wantarray)
242 1 45 unless (defined $parms)
248 1 44 unless (defined $key or defined $cache_key)
254 1 43 unless (defined $cache_dir)
265 5 38 unless (defined $cache_key)
276 22 21 unless (-e $cache_file)
288 0 21 if ($@)
294 0 21 unless (defined $entry)
335 1 10 unless (defined $parms)
346 0 10 unless ($result)
371 1 3 unless (defined $cache_dir)
375 1 2 if ($cache_dir eq '')
379 0 2 if (-e $cache_dir and not -d _)
387 0 2 unless (opendir $cache_dir_fh, $cache_dir)
395 0 2 unless (closedir $cache_dir_fh)
408 0 10 unless (unlink $file_path)
467 1 20 unless (defined $parms)
473 1 19 unless (defined $key or defined $cache_key)
479 1 18 unless (defined $cache_dir)
487 2 16 unless (defined $cache_key)
509 0 18 if ($@)
515 0 18 unless (defined $result)
525 0 18 unless (opendir $cache_dir_fh, $cache_dir)
532 0 18 unless (closedir $cache_dir_fh)
549 14 4 if ($n_files <= $keep_last)
564 0 4 unless (unlink $pruned_file)
602 1 6 unless (defined $parms)
608 1 5 unless (defined $key or defined $cache_key)
614 1 4 unless (defined $cache_dir)
618 0 4 if ($cache_dir eq '')
626 2 2 unless (defined $cache_key)
642 0 4 if (-e $cache_file and not unlink($cache_file))
712 0 2 unless (defined $cache_dir)
716 0 2 if ($cache_dir eq '')
721 0 2 unless (opendir $cache_dir_fh, $cache_dir)
727 0 2 unless (closedir $cache_dir_fh)
771 0 67 unless (defined $cache_dir)
775 0 67 if ($cache_dir eq '')
779 0 67 if (-e $cache_dir and not -d _)
783 0 67 unless (-e $cache_dir)
788 0 0 if ($@)
794 0 67 unless (-e $cache_dir and -d _)
800 0 67 unless (open $cache_lock_fh, ">>$document_name")
809 0 0 if ($lock_timeout == 0)
818 0 67 unless (truncate $cache_lock_fh, 0)
843 0 67 unless (truncate $cache_lock_fh, 0)
848 0 67 unless (close $cache_lock_fh)
867 229 105 if (0 == @_) { }
105 0 elsif (1 == @_) { }
892 2 2 unless defined $keep_last
893 1 3 unless (defined $cache_dir and $cache_dir ne '')
909 8 1 if (ref \$key eq 'SCALAR') { }
923 6 1 if (ref \$key eq 'SCALAR') { }
941 1 1 if (ref \$key eq 'SCALAR') { }
963 16 2 if (ref \$key eq 'SCALAR') { }