Branch Coverage

blib/lib/AutoSession/Driver/File.pm
Criterion Covered Total %
branch 31 66 46.9


line true false branch
49 1 0 if (defined $args{'directory'} and not defined $args{'dir'})
50 0 1 if (defined $args{'dir'} and $args{'dir'} eq '')
53 0 1 if ($$this{'dir'} eq '' or not -d $$this{'dir'})
57 0 1 if ($$this{'id'} eq '') { }
67 0 1 unless (defined $args{'expire'})
76 1 0 unless $$this{'nocreate'}
78 0 1 unless (-e $$this{'file'})
90 0 1 if ($$this{'nocreate'})
92 1 0 unless (-e $$this{'file'})
109 1 0 if (-e $$this{'file'})
112 1 0 unless -e $$this{'file'}
124 0 7 unless ($stats[7])
135 0 2 if ($$this{'closed'})
137 0 2 if (not -s $$this{'file'}) { }
146 0 6 unless $n
157 0 2 if ($$this{'defexpire'})
158 0 0 if $headers{'expire'}
161 0 2 if ($headers{'base64'})
181 1 5 if (not $$this{'tree'} or $$this{'closed'})
183 0 5 if ($$this{'nocreate'} and not -e $$this{'file'})
185 0 5 unless (ref $$this{'tree'})
189 0 5 if ($$this{'base64'})
222 0 1 if ($id eq '')
227 0 2 if (-e $file)
243 1 28 if ($filename =~ /^SESSION-(\w+)\.(?:tmp|hpl)$/s)
251 0 0 if ($id ne $$this{'id'} and $size || $size == 0 && CORE::time - $mdtime > 86400)
254 0 0 if ($idle >= $headers{'expire'})
270 0 0 if (-s $file)
276 0 0 unless $n
301 1 1 if (wantarray)
305 0 1 if ($AutoSession::WITH_HPL) { }
327 0 5 if ($AutoSession::WITH_HPL)
342 2 0 if ($module eq 'AutoSession' and $ver == $AutoSession::VERSION)