Branch Coverage

blib/lib/Dancer/Session/YAML.pm
Criterion Covered Total %
branch 16 24 66.6


line true false branch
25 2 1 unless (keys %session_dir_initialized)
26 0 2 unless "Dancer::ModuleLoader"->load("YAML")
31 0 3 unless defined setting("session_dir")
35 2 1 if (not exists $session_dir_initialized{$session_dir})
38 2 0 unless (-d $session_dir)
39 0 2 unless mkdir $session_dir
66 0 6 unless ($id =~ /^[\da-z]+$/i)
73 2 4 unless defined $session_file and -f $session_file
75 0 4 unless open my $fh, "+<", $session_file
77 0 4 unless close $fh
90 1 18 unless $1
101 1 0 if -f yaml_file($self->id)