Branch Coverage

Bio/Index/Abstract.pm
Criterion Covered Total %
branch 47 108 43.5


line true false branch
106 8 12 if (defined $value)
149 4 0 if $filename
150 0 4 if $cachesize
151 0 4 if $ffactor
152 4 0 if $write_flag
153 0 4 if $dbm_package
156 0 4 $pathtype ? :
162 4 0 if $filename
212 4 3 if ($value or not $self->{'_dbm_package'})
214 2 2 if ($type =~ /DB_File/i)
218 2 0 $@ ? :
220 4 0 if ($type ne 'DB_File')
222 0 4 if $@
225 2 2 unless (defined $Bio::Index::Abstract::USE_DBM_TYPE)
292 16 0 if (my $rec = $db->{$id}) { }
323 0 0 if (defined $size)
344 0 0 if (defined $size)
370 0 4 unless my $filename = $self->filename
377 0 4 if (ref $db ne 'HASH')
385 4 0 $self->write_flag ? :
388 0 4 if ($dbm_type eq 'DB_File') { }
392 0 0 if ($cache)
395 0 0 if ($ffactor)
398 0 0 unless tie %$db, $dbm_type, $filename, $mode_flags, 420, $hash_inf
401 0 4 unless tie %$db, $dbm_type, $filename, $mode_flags, 420
409 0 4 if (ref $self eq 'Bio::Index::Abstract')
462 0 0 if (wantarray) { }
491 0 4 if (my $rec = $self->db->{$key}) { }
493 0 0 unless $db_version == $version
495 0 0 unless $db_type eq $type
498 0 4 unless $self->add_record($key, $type, $version)
526 0 0 unless ($size == $stored_size)
556 0 4 unless (defined $self->write_flag)
561 0 4 unless @files
563 4 0 if ($Bio::Root::IO::FILESPECLOADED and 'File::Spec'->can('rel2abs')) { }
564 4 0 if (not 'File::Spec'->file_name_is_absolute($files[$i]) and $self->pathtype ne 'relative')
569 0 0 if ($^O =~ /MSWin/i) { }
570 0 0 unless $files[$i] =~ m[^[A-Za-z]:/]
573 0 0 unless $files[$i] =~ m[^/]
577 0 4 unless -e $files[$i]
587 0 4 if (defined(my $count = $self->_file_count)) { }
596 0 4 if ($record = $self->db->{"__FILENAME_$file"})
600 0 0 if (-s $file == $size) { }
615 0 4 unless $self->add_record("__FILE_$i", $file, -s $file)
617 0 4 unless $self->add_record("__FILENAME_$file", $i, -s $file)
651 4 4 if (defined $type)
652 0 4 if ($type ne 'absolute' and $type ne 'relative')
700 4 12 unless ($self->{'_filehandle'}[$i])
701 0 4 unless my(@rec) = $self->unpack_record($self->db->{"__FILE_$i"})
704 0 4 unless open my $fh, '<', $file
727 8 12 if (@_)
752 0 33 if (exists $self->db->{$id})
777 66 0 defined $_ ? :
817 0 0 if ($id =~ /^__/)