Branch Coverage

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


line true false branch
35 1 3 if (not -d $self->session_dir)
36 0 1 unless mkdir $self->session_dir
47 0 0 unless opendir my $dh, $self->session_dir
53 0 0 if $file eq "." or $file eq ".."
54 0 0 if ($file =~ /(\w+)\Q$suffix\E/)
67 1 16 unless -f $session_file
69 0 16 unless open my $fh, "+<", $session_file
70 0 16 unless flock $fh, 1
72 0 16 unless close $fh
83 0 1 unless -f $old_path
94 0 5 unless -f $session_file
103 0 21 unless open my $fh, ">", $session_file
104 0 21 unless flock $fh, 2
105 0 21 unless seek $fh, 0, 0
106 0 21 unless truncate $fh, 0
109 0 21 unless close $fh