Branch Coverage

Bio/DB/Flat.pm
Criterion Covered Total %
branch 33 140 23.5


line true false branch
142 0 1 if ref $class
149 0 1 unless defined $flat_directory
151 0 1 unless defined $dbname
158 0 1 unless -e $flat_directory
160 0 1 unless -d _
163 1 0 unless (-d $dbpath)
165 0 1 unless mkdir $dbpath, 511
172 0 1 unless $self->indexing_scheme
176 1 0 $self->indexing_scheme eq 'flat/1' ? :
0 1 $self->indexing_scheme eq 'BerkeleyDB/1' ? :
184 1 0 if ($index_type eq 'Binary')
187 0 1 if $@
195 0 0 if $@
212 1 0 if defined $flat_write_flag
214 1 0 if (defined $flat_indexing)
216 0 1 if $flat_indexing =~ /bdb/
217 1 0 if $flat_indexing =~ /^(flat|binary)/
221 0 1 if defined $flat_verbose
222 1 0 if defined $dbname
223 0 1 if defined $flat_outfile
224 1 0 if defined $flat_format
231 0 0 unless defined $self->{'flat_primary_namespace'}
234 0 0 unless defined $self->{'flat_secondary_namespaces'}
237 0 0 unless defined $self->{'flat_format'}
259 0 0 unless my $location = $config{'location'}
261 0 0 unless my $dbname = $config{'dbname'}
274 1 1 if @_
280 1 0 if @_
286 1 1 if @_
292 0 0 if @_
298 2 1 if @_
304 0 0 if @_
314 0 0 ref $_[0] eq 'ARRAY' ? :
0 0 if @_
315 0 0 unless $d
316 0 0 if $d and ref $d ne 'ARRAY'
317 0 0 wantarray ? :
324 1 1 if @_
332 0 0 if @_
342 0 0 unless my $seq = $parser->next_seq
353 1 3 if @_
362 0 0 unless ('File::Spec'->file_name_is_absolute($file_path))
366 0 0 unless -r $file_path
369 0 0 if (defined $file_length) { }
370 0 0 unless $current_size == $file_length
376 0 0 unless (defined $nf)
377 0 0 unless exists $self->{'flat_file_index'}
387 0 0 unless $self->write_flag
390 0 0 unless open my $F, '>', $path
397 0 0 $alphabet ? :
400 0 0 unless my(@filenos) = $self->_filenos
408 0 0 unless my $primary_ns = $self->primary_namespace
417 0 0 unless CORE::close $F
422 0 0 unless $self->{'flat_flat_file_no'}
430 0 0 unless $self->write_flag
432 0 0 unless my $file = $self->out_file
433 0 0 unless my $seqio = ($self->{'flat_cached_parsers'}{$file} ||= 'Bio::SeqIO'->new('-Format', $self->file_format, '-file', ">$file"))
438 0 0 unless my $fh = $seqio->_fh
450 1 0 unless $self->{'flat_outfile_dirty'}
459 0 0 unless $self->{'flat_flat_file_path'}
467 1 0 unless -e $path
469 0 0 unless open my $F, '<', $path
476 0 0 unless CORE::close $F
478 0 0 unless $config{'index'}[0] =~ m[(flat/1|BerkeleyDB/1)]
483 0 0 if ($config{'format'})
485 0 0 if ($config{'format'}[0] =~ m[^URN:LSID:open-bio\.org:(\w+)(?:/(\w+))]) { }
494 0 0 unless my $primary_namespace = $config{'primary_namespace'}[0]
502 0 0 if /^fileid_(\S+)/
528 0 0 unless exists $self->{'flat_flat_file_no'}{$path}
577 0 0 if @_ == 1