Branch Coverage

lib/Bio/Graphics/FeatureFile.pm
Criterion Covered Total %
branch 38 410 9.2


line true false branch
375 0 1 if exists $args{-'map_coords'} and ref $args{-'map_coords'} eq 'CODE'
378 0 1 if exists $args{-'smart_features'}
379 1 0 if exists $args{-'safe'}
380 0 1 if $args{-'safe_world'}
381 0 1 if $args{-'allow_whitespace'}
388 1 0 if (my $file = $args{-'file'}) { }
0 0 elsif (my $text = $args{-'text'}) { }
390 0 1 if (defined fileno $file) { }
0 1 elsif ($file eq '-') { }
421 0 0 unless ($has_libs = defined &nfreeze)
427 0 0 unless $has_libs
433 0 0 unless my $file = $has_libs && $args{-'file'}
436 0 0 if (-e $cachefile and (stat _)[9] >= $self->file_mtime($args{-'file'})) { }
439 0 0 if $parsed_file->safe
446 0 0 if $@
482 0 0 unless my $m = (stat $f)[9]
483 0 0 if $mtime < $m
484 0 0 unless open my $fh, '<', $file
490 0 0 if (/^\#exec/)
493 0 0 if (/^\#include\s+(.+)/i)
496 0 0 if $mtime < $m
511 0 0 unless open my $fh, '<', $file
517 0 0 if (/^\#include\s+(.+)/i)
520 0 0 @files ? :
590 0 0 unless ($panel and UNIVERSAL::isa($panel, 'Bio::Graphics::Panel'))
617 0 0 if ($options and ref $options eq 'HASH') { }
621 0 0 if ($options == 1) { }
0 0 elsif ($options == 2) { }
0 0 elsif ($options == 3) { }
0 0 elsif ($options == 4) { }
0 0 elsif ($options == 5) { }
638 0 0 unless @types
640 0 0 if defined $selector and not &$selector($self, $label)
642 0 0 !$range ? :
648 0 0 unless @features
651 0 0 if $_->has_tag('_ff_group')
655 0 0 if defined $max_bump
656 0 0 if defined $max_label
658 0 0 $override_options ? :
672 0 0 if (defined $position_to_insert) { }
678 0 0 wantarray ? :
684 0 1 unless defined fileno $file
685 0 1 unless my(@stat) = stat $file
686 0 1 if ($$self{'stat'} and @{$$self{'stat'};}) { }
688 0 0 if $stat[$_] > $$self{'stat'}[$_]
717 0 0 if @_
736 0 0 if @_
757 0 1 unless my $fh = 'IO::File'->new($f)
773 0 4 unless $self->parse_line($_)
793 0 5 if (/^#include\s+(.+)/i)
796 0 0 if $$self{'includes'}{$include_file}++
802 0 5 if (/^#exec\s+(.+)/i)
804 0 0 unless open my $fh, '-|'
809 0 5 if $line =~ /^\s*\#[^\#]?$/
817 1 4 if ($new_state ne $old_state)
822 4 1 if ($new_state eq 'config') { }
1 0 elsif ($new_state eq 'data') { }
836 0 5 if ($current_state eq 'data') { }
5 0 elsif ($current_state eq 'config') { }
837 0 0 if $line =~ /^\s*\[([^\]]+)\]/
841 0 5 if $line =~ /^\#\#(\w+)/
842 1 4 if $line =~ /^reference\s*=/
844 0 4 if $line =~ /^\s*$/
845 1 3 if $line =~ /^\[(.+)\]/
846 3 0 if $line =~ /^[\w:\s]+=/ and $$self{'current_config'}
848 0 0 if $line =~ /^\s+(.+)/ and $$self{'current_tag'}
850 0 0 if $line =~ /^\#/
861 4 0 unless /\#[0-9a-f]{6,8}\s*$/i or /\w+\#\w+/ or /\w+\"*\s*\#\d+$/
863 0 4 if (/^\s+(.+)/ and $$self{'current_tag'}) { }
1 3 elsif (/^\[(.+)\]/) { }
3 0 elsif (/^([\w: -]+?)\s*=\s*(.*)/) { }
0 0 elsif (/^$/) { }
868 0 0 if $$self{'config'}{$cc}{$$self{'current_tag'}} =~ /^sub\s*\{/
875 1 0 $label =~ /^(general|default)$/i ? :
876 0 1 unless $cc eq 'general'
884 3 0 defined $2 ? :
903 0 0 unless $$self{'loader'} ||= $self->_make_loader($line)
915 0 0 if (/^\#\#gff-version\s+([23])/) { }
0 0 elsif (/^reference\s*=.+/) { }
923 0 0 if /^\s+/ and length $tokens[0]
925 0 0 if (@tokens >= 8 and $tokens[3] =~ /^-?\d+$/ and $tokens[4] =~ /^-?\d+$/) { }
932 0 0 unless $type->can('new')
938 0 0 if $self->allow_whitespace
941 0 0 if $loader
965 0 0 if @_
987 0 0 if $self->smart_features
988 0 0 if defined $type
1016 0 0 $type =~ /^(general|default)$/i ? :
1017 0 0 unless $cc eq 'general' or $$self{'config'}{$cc}
1018 0 0 if (defined $type_configuration)
1044 0 0 unless @_ == 3
1047 0 0 if (not $$self{'config'}{$type}) { }
1092 0 0 if (@_ > 2) { }
0 0 elsif (@_ <= 1) { }
0 0 elsif ($self->safe) { }
0 0 elsif ($self->safe_world) { }
1109 0 0 if $$self{'code_check'}++
1128 0 0 if defined $value
1140 0 0 unless my $config = $$self{'config'}
1141 0 0 unless @_
1142 0 0 if @_ == 1
1143 0 0 if @_ == 2 and defined $_[0] and exists $$config{$_[0]}
1144 0 0 if @_ > 2
1166 0 0 unless $self->safe
1170 0 0 unless defined $setting
1171 0 0 if ref $setting eq 'CODE'
1172 0 0 if ($setting =~ /^\\&([:\w]+)/) { }
0 0 elsif ($setting =~ /^sub\s*(\(\$\$\))*\s*\{/) { }
1175 0 0 $subroutine_name =~ /::/ ? :
1179 0 0 if $@
1187 0 0 if $@
1222 0 0 unless defined $setting
1223 0 0 if ref $setting eq 'CODE'
1225 0 0 if ($setting =~ /^sub\s*(\(\$\$\))*\s*\{/ and my $context = $$self{'safe_context'}) { }
1243 0 0 if $@
1244 0 0 unless ($success)
1252 0 0 if ($_[-1]->isa('Bio::Graphics::Glyph'))
1257 0 0 $prototype ? :
1284 0 0 if @_
1285 0 0 if $$self{'safe'} and not $d
1306 0 0 if ($safe and not $$self{'safe_content'})
1309 0 0 unless ('Safe::World'->can('new'))
1314 0 0 unless ($$self{'safe_lib'})
1315 0 0 unless $$self{'safe_lib'} = 'Safe::World'->new('sharepack', ['Bio::DB::SeqFeature', 'Bio::Graphics::Feature', 'Bio::SeqFeature::Lite', 'Bio::Graphics::Glyph'])
1321 0 0 unless $$self{'safe_lib'}->eval("use Bio::DB::SeqFeature;\nuse Bio::Graphics::Feature;\nuse Bio::SeqFeature::Lite;\nuse Bio::Graphics::Glyph; \n1;\n")
1330 0 0 unless $$self{'safe_context'} = 'Safe::World'->new('root', $self->base2package)
1380 0 0 unless my $config = $$self{'config'}
1382 0 0 unless ($hashref)
1384 0 0 unless $hashref = $$config{$type}
1406 0 0 unless my $config = $$self{'config'}
1407 0 0 unless my $hashref = $$config{$type}
1428 0 0 unless my $types = $$self{'types'}
1456 0 0 if ($Bio::Root::Version::VERSION >= 1.0069 and $Bio::Root::Version::VERSION <= 1.006901)
1462 0 0 unless 'Bio::DB::GFF::Typename'->can('new')
1515 0 0 defined($_[0] && $_[0] =~ /^-/) ? :
1518 0 0 if $types and not ref $types
1519 0 0 $types && @$types ? :
1521 0 0 if $seq_id
1522 0 0 if defined $start
1523 0 0 if defined $end
1527 0 0 if ($iterator) { }
1531 0 0 wantarray ? :
1553 0 0 if $_[0] =~ /^\+/ or $_[0] > 0
1554 0 0 if $_[0] =~ /^\-/ or $_[0] < 0
1580 0 0 $_[0] =~ /^-/ ? :
1611 0 0 if defined $name
1612 0 0 if defined $ref
1613 0 0 if defined $start
1614 0 0 if defined $end
1666 0 0 unless my $refs = $$self{'refs'}
1704 0 0 if defined $$self{'min'} and defined $$self{'max'}
1707 0 0 if (my $bases = $self->setting('general', 'bases'))
1711 0 0 unless (defined $min)
1715 0 0 if not defined $min or $min > $f->start
1716 0 0 if not defined $max or $max < $f->start
1737 0 0 if ($s->safe) { }
0 0 elsif ($s->safe_world) { }
1744 0 0 if $$s{'loader'}
1770 0 0 if $self->_setting($s, $o) =~ /\Asub\s*{/
1779 0 0 unless my $init_code = $self->_setting('general', 'init_code')
1782 0 0 if $@
1787 0 0 if exists $$self{'base2package'}
1803 0 0 unless 'Bio::Graphics::Panel'->can('new')
1813 0 0 if (my $bases = $self->setting('general', 'bases'))
1817 0 0 unless (defined $start and defined $stop)
1818 0 0 unless defined $start
1819 0 0 unless defined $stop
1823 0 0 if $options and ref $options eq 'HASH'
1854 0 0 if @_
1876 0 0 $feature->can('type') ? :
1878 0 0 unless $type
1881 0 0 unless @labels
1882 0 0 unless @labels
1883 0 0 wantarray ? :
1904 0 0 if (ref $linkrule and ref $linkrule eq 'CODE')
1906 0 0 if $@
1910 0 0 unless defined &CGI::escape
1911 0 0 $dont_escape ? :
1915 0 0 $feature->can('seq_id') ? :
1933 0 0 $1 eq 'id' ? :
0 0 $1 eq 'description' ? :
0 0 $1 eq 'length' ? :
0 0 $1 eq 'segend' ? :
0 0 $1 eq 'segstart' ? :
0 0 $1 eq 'stop' ? :
0 0 $1 eq 'end' ? :
0 0 $1 eq 'start' ? :
0 0 $1 =~ /seq_?id/ ? :
0 0 $1 eq 'source' ? :
0 0 $1 eq 'method' ? :
0 0 $1 eq 'type' ? :
0 0 $1 eq 'class' ? :
0 0 $1 eq 'name' ? :
0 0 $1 eq 'ref' ? :
1946 0 0 unless ($linkrule)
1962 0 0 unless $linkrule
1967 0 0 $feature->can('seq_id') ? :
1969 0 0 if ($feature->can('target') and my $target = $feature->target) { }
1970 0 0 defined $seqid ? :
1977 0 0 $feature->can('display_name') ? :
0 0 defined $seqid ? :
1985 0 0 if $@
1995 0 0 wantarray ? :
2000 0 0 unless my $config = $$self{'config'}
2046 0 0 if @_