Branch Coverage

blib/lib/Apache/ASP/State.pm
Criterion Covered Total %
branch 57 90 63.3


line true false branch
40 199 0 if ($id) { }
48 57 142 if ($group) { }
54 0 199 unless ($group)
66 28 171 if ($id eq 'internal') { }
96 75 elsif ($$asp{'Internal'} and length $id > $Apache::ASP::State::DefaultGroupIdLength) { }
73 96 0 if (not $$idata{'state_db'} && $$idata{'state_serializer'}) { }
80 96 0 if (length $id > $Apache::ASP::State::DefaultGroupIdLength)
82 0 96 if (($$idata{'state_db'} || $Apache::ASP::DefaultStateDB) ne $state_db)
86 0 96 if (($$idata{'state_serializer'} || $Apache::ASP::DefaultStateSerializer) ne $state_serializer)
91 0 96 if ($diff)
92 0 0 if $$asp{'dbg'}
121 74 125 if ($group eq $id)
125 0 125 if ($asp->config('StateAllWrite')) { }
0 125 elsif ($asp->config('StateGroupWrite')) { }
126 0 0 if $$asp{'dbg'}
130 0 0 if $$asp{'dbg'}
143 2 123 unless (-d $state_dir)
147 13 112 unless (-d $group_dir)
150 13 112 if (@create_dirs)
156 15 0 if (mkdir $create_dir, $$self{'dir_perms'}) { }
157 1 14 if $$asp{'dbg'}
160 0 0 unless -d $create_dir
179 3 122 if $$asp{'dbg'}
183 0 125 unless ($$self{'dbm'})
207 0 0 if (-d $group_dir)
209 0 0 if (rmdir $group_dir) { }
225 0 74 unless (opendir DIR, $$self{'group_dir'})
231 148 33 if /^\.\.?$/
233 0 33 unless $1
242 74 0 if (my $internal = $$self{'asp'}{'Internal'})
244 8 66 unless ($cached_keys = $$self{'asp'}{'internal_cached_keys'})
246 57 96 if (/^([0-9a-f]{2})/)
252 41 33 if (my $group_keys = $$cached_keys{$$self{'group'}})
267 0 8 unless opendir STATEDIR, $$self{'state_dir'}
271 16 82 if /^\./
272 8 74 unless length $_ eq $Apache::ASP::State::DefaultGroupIdLength
282 0 280 if $$self{'asp'}{'win32'}
288 0 280 if $$self{'asp'}{'win32'}
289 280 0 if (defined $$self{'umask_restore'})
296 43 309 unless %{$self;}
297 110 199 if $$self{'destroyed'}++
298 125 74 if $$self{'dbm'}
321 0 56 if (ref($_[0]) =~ /State/) { }
332 0 482 if ($index eq '_FILE') { }
0 482 elsif ($index eq '_SELF') { }