Branch Coverage

blib/lib/Apache/ASP/State.pm
Criterion Covered Total %
branch 54 90 60.0


line true false branch
40 28 0 if ($id) { }
48 15 13 if ($group) { }
54 0 28 unless ($group)
66 7 21 if ($id eq 'internal') { }
14 7 elsif ($$asp{'Internal'} and length $id > $DefaultGroupIdLength) { }
73 14 0 if (not $$idata{'state_db'} or not $$idata{'state_serializer'}) { }
80 14 0 if (length $id > $DefaultGroupIdLength)
82 0 14 if (($$idata{'state_db'} || $Apache::ASP::DefaultStateDB) ne $state_db)
86 0 14 if (($$idata{'state_serializer'} || $Apache::ASP::DefaultStateSerializer) ne $state_serializer)
91 0 14 if ($diff)
92 0 0 if $$asp{'dbg'}
121 6 22 if ($group eq $id)
125 0 22 if ($asp->config('StateAllWrite')) { }
0 22 elsif ($asp->config('StateGroupWrite')) { }
126 0 0 if $$asp{'dbg'}
130 0 0 if $$asp{'dbg'}
143 2 20 unless (-d $state_dir)
147 8 14 unless (-d $group_dir)
150 8 14 if (@create_dirs)
156 10 0 if (mkdir $create_dir, $$self{'dir_perms'}) { }
157 0 10 if $$asp{'dbg'}
160 0 0 unless -d $create_dir
179 0 22 if $$asp{'dbg'}
183 0 22 if (not $$self{'dbm'})
207 0 0 if (-d $group_dir)
209 0 0 if (rmdir $group_dir) { }
225 0 6 unless (opendir DIR, $$self{'group_dir'})
231 12 18 if /^\.\.?$/
233 0 18 unless $1
242 6 0 if (my $internal = $$self{'asp'}{'Internal'})
244 2 4 unless ($cached_keys = $$self{'asp'}{'internal_cached_keys'})
246 7 8 if (/^([0-9a-f]{2})/)
252 6 0 if (my $group_keys = $$cached_keys{$$self{'group'}})
267 0 2 unless opendir STATEDIR, $$self{'state_dir'}
271 4 8 if /^\./
272 2 6 unless length $_ eq $DefaultGroupIdLength
282 0 78 if $$self{'asp'}{'win32'}
288 0 78 if $$self{'asp'}{'win32'}
289 78 0 if (defined $$self{'umask_restore'})
296 8 50 unless %{$self;}
297 22 28 if $$self{'destroyed'}++
298 22 6 if $$self{'dbm'}
321 0 14 if (ref($_[0]) =~ /State/) { }
332 0 69 if ($index eq '_FILE') { }
0 69 elsif ($index eq '_SELF') { }