Branch Coverage

blib/lib/Number/Phone/UK/DBM/Deep.pm
Criterion Covered Total %
branch 46 266 17.2


line true false branch
109 24 0 if (scalar @_ > 1) { }
0 0 elsif (ref $_[0]) { }
110 0 24 if (@_ % 2)
116 0 0 unless %{$_[0];}
0 0 unless (eval { do { local $SIG{'__DIE__'}; 1 unless %{$_[0];} } })
141 0 12 if (defined $args->{'type'} and $args->{'type'} eq 'A') { }
169 1 23 unless exists $args->{$param}
174 0 12 if ($args->{'locking'})
178 11 1 exists $args->{'root'} ? :
180 0 12 unless (defined $self->_fh)
210 0 0 if (defined $self->_fh)
216 0 0 unless sysopen $fh, $self->_root->{'file'}, $flags
220 0 0 if ($self->_root->{'autoflush'})
234 0 0 unless ($bytes_read)
257 0 0 unless ($signature eq 'DPDB')
274 0 0 unless ($tag)
277 0 0 if ($self->{'type'} ne $tag->{'signature'})
289 0 0 if $self->_root->{'fh'}
307 0 0 if ($offset == $self->_root->{'end'})
331 0 47 if (eof $fh)
356 0 27 unless ($location)
377 0 0 unless defined $r
379 0 0 if $r eq 'HASH'
380 0 0 if $r eq 'ARRAY'
399 0 0 unless ($subloc)
407 0 0 $internal_ref ? :
415 0 0 if ($md5 eq $key)
421 0 0 if ($internal_ref)
439 0 0 if ($r eq 'HASH' or $r eq 'ARRAY') { }
444 0 0 if ($root->{'autobless'})
446 0 0 if (defined $value_class and not $value->isa('Number::Phone::UK::DBM::Deep'))
453 0 0 if ($actual_length <= ($size || 0)) { }
470 0 0 if ($internal_ref)
477 0 0 unless ($location)
488 0 0 if ($key)
492 0 0 if ($offsets[$num]) { }
500 0 0 unless ($subloc)
526 0 0 if ($location)
534 0 0 if ($r eq 'HASH') { }
0 0 elsif ($r eq 'ARRAY') { }
0 0 elsif (not defined $value) { }
535 0 0 if (not $internal_ref and tied %{$value;})
543 0 0 if (not $internal_ref and tied @{$value;})
569 0 0 if ($root->{'autobless'})
571 0 0 if (defined $value_class and $value_class ne 'Number::Phone::UK::DBM::Deep') { }
589 0 0 if ($location == $root->{'end'})
599 0 0 if ($r eq 'HASH') { }
0 0 elsif ($r eq 'ARRAY') { }
644 0 21 unless ($subloc)
651 6 15 if ($md5 ne $key)
665 11 4 if ($signature eq 'H' or $signature eq 'A') { }
4 0 elsif ($signature eq 'D') { }
672 0 11 if ($self->_root->{'autobless'})
681 0 0 if ($size)
685 0 0 if (ord $bless_bit)
691 0 0 if ($size)
692 0 0 if ($class_name)
706 4 0 if ($size)
739 0 0 unless ($subloc)
746 0 0 if ($md5 ne $key)
779 4 12 unless ($subloc)
786 11 1 if ($md5 ne $key)
811 0 20 unless ($tag)
815 0 27 unless ($tag)
827 0 0 unless $force_return_next
835 0 0 if ($tag->{'signature'} ne 'B') { }
0 0 elsif ($tag->{'signature'} eq 'B') { }
838 0 0 if ($self->{'return_next'}) { }
843 0 0 if ($subloc)
845 0 0 if (defined $result)
854 0 0 if ($force_return_next)
863 0 0 if (not $subloc) { }
0 0 elsif ($key eq $self->{'prev_md5'}) { }
0 0 elsif ($self->{'return_next'}) { }
888 0 0 if ($size)
895 0 0 if ($size)
913 0 0 $_[1] ? :
920 0 0 unless ($self->{'prev_md5'})
936 0 20 unless defined $type
938 0 20 unless (defined $self->_fh)
940 0 20 if ($self->_root->{'locking'})
941 0 0 unless ($self->_root->{'locked'})
950 0 0 if ($stats[1] != $self->_root->{'inode'})
971 0 20 unless (defined $self->_fh)
973 0 20 if ($self->_root->{'locking'} and $self->_root->{'locked'} > 0)
975 0 0 unless ($self->_root->{'locked'})
987 0 0 if (not ref $value) { }
0 0 elsif (eval { do { local $SIG{'__DIE__'}; $value->isa('Number::Phone::UK::DBM::Deep') } }) { }
992 0 0 $type eq 'H' ? :
998 0 0 if ($r eq 'ARRAY') { }
1004 0 0 if defined $c
1019 0 0 if ($self->_type eq 'H') { }
1045 0 0 if ($self->_type eq 'H') { }
0 0 elsif ($self->_type eq 'A') { }
1060 1 0 unless (ref $_[0])
1066 0 0 unless (ref $struct)
1072 0 0 if ($self->_type eq 'H') { }
0 0 elsif ($self->_type eq 'A') { }
1077 0 0 if ($r eq 'HASH' and $self->_type eq 'H') { }
0 0 elsif ($r eq 'ARRAY' and $self->_type eq 'A') { }
1106 0 0 unless ($db_temp)
1125 0 0 if ($^O eq 'MSWin32' or $^O eq 'cygwin')
1136 0 0 unless (rename $self->_root->{'file'} . '.tmp', $self->_root->{'file'})
1176 0 0 $_[2] ? :
1178 0 0 if ($is_legal_filter{$type})
1230 1 0 $_[0] ? :
1243 0 0 if (&Scalar::Util::blessed($_[0])) { }
1247 0 0 unless ($self->_root->{'debug'})
1274 1 1 unless defined $LONG_SIZE
1287 0 1 $long_s ? :
1288 0 1 $long_p ? :
1290 0 1 $data_s ? :
1291 0 1 $data_p ? :
1302 0 1 $digest_func ? :
1303 0 1 $hash_size ? :
1334 0 0 $self->_root->{'filter_store_value'} && !ref($_[2]) ? :
1342 0 0 unless (defined $self->_fh or $self->_open)
1346 0 0 if ($^O ne 'MSWin32' and not _is_writable($self->_fh))
1361 0 0 unless ($tag)
1372 0 0 if (not $new_tag) { }
1412 0 15 unless (defined $self->_fh)
1422 0 15 unless ($tag)
1438 0 15 $result && !ref($result) && $self->_root->{'filter_fetch_value'} ? :
1454 0 0 unless (defined $self->_fh)
1462 0 0 unless ($tag)
1471 0 0 if ($value and not ref $value and $self->_root->{'filter_fetch_value'})
1499 0 5 unless (defined $self->_fh)
1511 0 5 unless ($tag)
1535 0 0 unless (defined $self->_fh)
1545 0 0 if (eof $fh)
1591 1 0 if ($self->{'fh'} and not $self->{'file_offset'})
1600 0 0 unless $self
1602 0 0 if $self->{'fh'}