Branch Coverage

blib/lib/Dancer2/Core/Role/SessionFactory/File.pm
Criterion Covered Total %
branch 15 32 46.8


line true false branch
48 1 3 if (not $self->_session_dir_path->is_dir)
49 0 1 unless mkdir $self->session_dir
60 0 0 unless opendir my $dh, $self->session_dir
66 0 0 if $file eq "." or $file eq ".."
67 0 0 if ($file =~ /(\w+)\Q$suffix\E/)
82 1 16 unless -f $session_file
84 0 16 unless open my $fh, "+<", $session_file
85 0 16 unless flock $fh, 1
87 0 16 unless close $fh
99 0 1 unless -f $old_path
113 0 5 unless -f $session_file
124 0 21 unless open my $fh, ">", $session_file
125 0 21 unless flock $fh, 2
126 0 21 unless seek $fh, 0, 0
127 0 21 unless truncate $fh, 0
130 0 21 unless close $fh