Branch Coverage

blib/lib/CGI/Session/Driver/file.pm
Criterion Covered Total %
branch 29 50 58.0


line true false branch
32 0 37 unless (-d $$self{'Directory'})
34 0 0 unless (File::Path::mkpath($$self{'Directory'}))
39 37 0 unless exists $$self{'NoFlock'}
40 37 0 unless exists $$self{'UMask'}
50 0 55 if ($id =~ m[/])
64 9 15 unless -e $path
69 0 15 if (-l $path)
70 0 0 unless unlink $path
74 0 15 unless sysopen FH, $path, 0 | $CGI::Session::Driver::file::NO_FOLLOW
76 0 15 unless $$self{'NoFlock'} or flock FH, 1
100 1 21 if (-l $path)
101 0 1 unless unlink $path
105 20 2 unless -e $path
107 0 22 unless sysopen FH, $path, $mode, $$self{'UMask'}
110 0 22 if (-l $path)
115 0 22 unless $$self{'NoFlock'} or flock FH, 2
116 0 22 unless truncate FH, 0
119 0 22 unless close FH
128 0 7 unless unlink $path
137 0 1 unless ($coderef and ref $coderef and ref $coderef eq 'CODE')
141 0 1 unless opendir DIRHANDLE, $$self{'Directory'}
148 2 51 if $filename =~ /^\.\.?$/
150 0 51 unless my $mode = (stat $full_path)[2]
152 1 50 if S_ISDIR($mode)
153 1 49 if ($filename =~ /^$filename_pattern$/)