Branch Coverage

blib/lib/DBM/Deep/Engine/File.pm
Criterion Covered Total %
branch 134 172 77.9


line true false branch
64 388 0 unless exists $args->{'storage'}
86 3 384 if (defined $args->{'pack_size'})
87 1 2 if (lc $args->{'pack_size'} eq 'small') { }
1 1 elsif (lc $args->{'pack_size'} eq 'medium') { }
1 0 elsif (lc $args->{'pack_size'} eq 'large') { }
103 3570 687 unless exists $args->{$param}
114 12 1149 if (not defined $self->{$attr} && length $self->{$attr} or $self->{$attr} =~ /\D/ or $self->{$attr} < $c->{'floor'}) { }
3 1146 elsif ($self->{$attr} > $c->{'ceil'}) { }
119 3 9 unless defined $self->{$attr}
129 386 1 unless ($self->{'digest'})
142 1 3131 unless my $sector = $self->load_sector($obj->_base_offset)
145 0 3131 if ($sector->staleness != $obj->_staleness)
156 77 3054 unless ($value_sector)
168 0 12 unless my $sector = $self->load_sector($obj->_base_offset)
171 0 12 if ($sector->staleness != $obj->_staleness)
183 0 29 unless my $sector = $self->load_sector($obj->_base_offset)
186 0 29 if ($sector->staleness != $obj->_staleness)
197 0 29 unless ($value_sector)
210 6 23 if ($value_sector->isa('DBM::Deep::Sector::File::Reference')) { }
235 1 126 unless my $sector = $self->load_sector($obj->_base_offset)
238 0 126 if ($sector->staleness != $obj->_staleness)
248 59 67 $data ? :
255 1 63 unless my $sector = $self->load_sector($obj->_base_offset)
258 0 63 if ($sector->staleness != $obj->_staleness)
274 564 1231 if $r eq ""
275 177 1054 if $r eq "HASH"
276 1049 5 if $r eq "ARRAY"
284 1 1789 unless my $sector = $self->load_sector($obj->_base_offset)
287 0 1789 if ($sector->staleness != $obj->_staleness)
292 58 1731 if (not defined $value) { }
3 1728 elsif (ref $value eq 'DBM::Deep::Null') { }
1223 505 elsif ($r eq 'ARRAY' or $r eq 'HASH') { }
304 1049 174 if ($r eq 'ARRAY') { }
174 0 elsif ($r eq 'HASH') { }
310 1017 206 if ($tmpvar)
313 4 1013 unless ($is_dbm_deep)
317 0 1013 unless ($tmpvar->_engine->storage == $self->storage)
328 1 1012 if (defined $loc and $loc == $tmpvar->_base_offset)
348 0 505 if (tied $value)
378 387 2555 unless ($obj->_base_offset)
382 288 94 if ($bytes_read) { }
402 0 288 unless ($initial_reference)
406 6 282 unless ($obj->_type eq $initial_reference->type)
423 0 275 unless ($self->supports("transactions"))
427 1 274 if ($self->trans_id)
434 32132 274 if $slots[$i]
441 0 274 unless ($found)
446 0 274 unless ($self->trans_id)
457 0 12 unless ($self->supports("transactions"))
461 1 11 unless ($self->trans_id)
479 28 11 if ($data_loc > 1)
499 0 10 unless ($self->supports("transactions"))
503 1 9 unless ($self->trans_id)
527 11 24 if ($head_loc > 1)
615 0 1209 unless $trans_id
637 0 20 unless $trans_id
694 190 2 if (exists $locs->{$old_loc})
776 94 296 unless length $buffer
782 1 295 unless ($file_signature eq $self->SIG_FILE)
787 2 293 unless ($sig_header eq $self->SIG_HEADER)
792 2 291 if ($file_version < $min_file_version)
801 0 291 if ($file_version > $this_file_version)
815 0 291 if (@values != 4 or grep {not defined $_;} @values)
820 0 291 if ($values[3] != $self->{'num_txns'})
834 0 291 unless ($size == $header_var)
846 2 4 if $_[0] == 4
847 2 2 if $_[0] == 3
848 0 2 if $_[0] == 2
849 2 0 if $_[0] == 1
850 0 0 if $_[0] == 0
866 6169 5 if $self->{'v'} >= 4
956 5379 301 unless ($loc)
1014 382 3637 unless (exists $self->{'txn_bitfield_len'})
1016 368 14 if ($temp > int $temp)
1053 305 2 if ($feature eq "transactions")
1056 1 1 if $feature eq "singletons"
1057 1 0 if $feature eq "unicode"
1062 1 1 $_[0]{'v'} == 3 ? :
1069 0 217 unless my $sector = $self->load_sector($obj->_base_offset)
1072 0 217 unless $sector->staleness == $obj->_staleness
1121 9 0 unless ($loc)
1136 0 11 if (not $sector) { }
1139 0 0 if (exists $sectors{$type}{$spot})
1151 6 5 if ($sector->type =~ /^[DU]\z/) { }
3 2 elsif ($sector->type eq 'A' or $sector->type eq 'H') { }
2 0 elsif ($sector->type eq 'B') { }