Branch Coverage

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


line true false branch
32 0 48 unless (-d $self->{'Directory'})
34 0 0 unless (File::Path::mkpath($self->{'Directory'}))
39 48 0 unless exists $self->{'NoFlock'}
40 48 0 unless exists $self->{'UMask'}
50 0 87 if ($id =~ m[/])
64 14 20 unless -e $path
69 0 20 if (-l $path)
70 0 0 unless unlink $path
74 0 20 unless sysopen FH, $path, 0 | $CGI::Session::Driver::file::NO_FOLLOW
76 0 20 unless $self->{'NoFlock'} or flock FH, 1
100 1 34 if (-l $path)
101 0 1 unless unlink $path
105 27 8 unless -e $path
107 0 35 unless sysopen FH, $path, $mode, $self->{'UMask'}
110 0 35 if (-l $path)
115 0 35 unless $self->{'NoFlock'} or flock FH, 2
116 0 35 unless truncate FH, 0
119 0 35 unless close FH
128 0 16 unless unlink $path
137 0 1 unless ($coderef and ref $coderef and ref $coderef eq "CODE")
142 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$/)