Branch Coverage

blib/lib/Data/RecordStore.pm
Criterion Covered Total %
branch 87 100 87.0


line true false branch
111 32 4 if (-e $cfgfile)
113 0 32 unless -e $lockfile
114 0 32 unless open my $lock_fh, '+<', $lockfile
119 0 32 unless -d $lock_dir
120 0 32 unless -d $trans_dir
130 32 0 if 2 ** $max_silo_id < $max_file_size
132 8 24 if 2 ** $min_silo_id < $min_file_size
166 55 174 if (@options == 1)
171 14 215 unless (-d $dir)
175 189 40 unless $max_file_size
178 205 24 unless $min_file_size
179 16 213 if ($min_file_size > $max_file_size)
183 197 16 if 2 ** $max_silo_id < $max_file_size
185 8 205 if 2 ** $min_silo_id < $min_file_size
193 55 158 if (-e $lockfile) { }
194 0 55 unless open $lock_fh, '+<', $lockfile
198 0 158 unless open $lock_fh, '>', $lockfile
204 0 158 if (-e $vers_file)
267 169 634 if ($trans and not $no_trans)
268 16 153 if ($trans->{'state'} != 1)
276 1 633 if ($id > $self->entry_count)
281 536 97 if ($silo_id)
296 263 561 if ($trans)
304 2 559 if (defined $id and $id < 1)
308 49 510 if ($id > 0) { }
323 20 538 if ($old_silo_id)
339 72 66 if ($trans)
344 1 65 if ($del_id > $self->[4]->entry_count)
352 57 8 if ($old_silo_id)
365 9 33 if (@{$self->[10];} and grep {not $previously_locked{$_};} @locknames)
373 9 61 if $previously_locked{$name}++
376 11 50 if (-e $lockfile) { }
377 0 11 unless (open $fh, '+<', $lockfile)
384 0 50 unless (open $fh, '>', $lockfile)
395 0 33 if ($failed) { }
421 24 70 if ($self->[7])
430 0 70 if (@$err)
440 8 46 unless ($trans)
458 8 24 unless ($trans)
511 224 88 if $silo_id
520 13 2 if (-e $ver_file) { }
1 1 elsif (-e "$dir/STORE_INDEX") { }
537 118 87 if ($id_to_empty == $rc) { }
542 47 16 if ($state == 1) { }
8 8 elsif ($state == 2) { }
565 791 30 if 2 ** $silo_id < $write_size
566 645 176 if $silo_id < $self->[3]
575 0 488 if (@$err)
612 16 317 if ($state == 3 or $state == 2) { }
43 274 elsif ($state == 4) { }