Branch Coverage

blib/lib/Bio/Tools/EUtilities.pm
Criterion Covered Total %
branch 110 258 42.6


line true false branch
32 22 22 if ($class =~ /Bio::Tools::EUtilities::(\S+)/) { }
40 0 22 unless $class->_load_eutil_module($DATA_MODULE{$eutil})
64 0 22 if $response
65 0 22 if $pobj
67 7 15 if $response or $eutil ne 'elink' and $eutil ne 'esummary'
78 22 22 if (defined $cache)
79 0 22 $cache ? :
87 0 22 if ($response)
88 0 0 unless ref $response and $response->isa('HTTP::Response')
97 4 30 if ($pb)
98 0 4 unless ref $pb and $pb->isa('Bio::ParameterBaseI')
99 0 4 unless ref $pb and $pb->isa('Bio::Tools::EUtilities::EUtilParameters')
132 22 0 $self->_fh ? :
0 22 $self->response ? :
137 1 21 if ($eutil eq 'espell') { }
0 21 elsif ($response and $response->isa('HTTP::Response')) { }
149 0 22 if (defined $simple->{'ERROR'} and not ref $simple->{'ERROR'})
156 0 22 if ($simple->{'InvalidIdList'})
160 0 22 if ($simple->{'ErrorList'} or $simple->{'WarningList'})
161 0 0 if $simple->{'ErrorList'}
162 0 0 if $simple->{'WarningList'}
178 22 0 unless $self->cache_response
188 0 0 $eutil eq 'esummary' ? :
0 0 $eutil eq 'elink' ? :
192 0 0 if ($self->response) { }
194 0 0 if not $self->cache_response and $self->data_parsed
200 0 0 unless $seendoc or $line =~ /^<$tag>/
203 0 0 if $line =~ m[^]
205 0 0 unless (defined $line)
220 0 0 if $self->can('parse_data') and not $self->data_parsed
236 0 23 if ($self->is_lazy)
240 0 23 unless $self->data_parsed
241 2 21 if ($eutil eq 'esearch') { }
15 6 elsif ($eutil eq 'elink') { }
2 4 elsif ($eutil eq 'esummary') { }
1 3 elsif (my $pb = $self->parameter_base) { }
242 2 0 $self->{'_id'} ? :
245 4 11 if ($request) { }
246 0 4 if (ref $request eq 'CODE') { }
256 0 11 if $self->get_linked_databases > 1
262 2 0 unless (exists $self->{'_id'})
268 1 0 $ids ? :
287 18 33 unless $self->data_parsed
290 12 39 if ($eutil eq 'einfo' or $eutil eq 'espell') { }
3 36 elsif ($eutil eq 'egquery') { }
24 12 elsif ($eutil eq 'elink') { }
5 7 elsif ($self->parameter_base) { }
302 0 5 if ($self->parameter_base->eutil eq 'elink') { }
319 1 3 unless $self->data_parsed
321 4 0 unless exists $self->{'_histories_it'}
333 0 0 unless $self->data_parsed
334 0 0 ref $self->{'_histories'} ? :
340 2 4 unless $self->data_parsed
342 3 3 if ($self->datatype eq 'multidbquery') { }
343 0 3 unless ($db)
348 3 0 if $gq
359 0 6 unless $self->data_parsed
361 1 2 $self->parameter_base ? :
2 3 $self->{'_query'} ? :
1 5 $self->{'_term'} ? :
369 0 3 unless $self->data_parsed
376 0 3 unless $self->data_parsed
383 0 3 unless $self->data_parsed
390 0 3 unless $self->data_parsed
397 0 0 unless $self->data_parsed
404 0 3 unless $self->data_parsed
411 0 4 unless $self->data_parsed
412 2 0 if ($self->{'_spelledquery'} and $self->{'_spelledquery'}{'Replaced'})
414 2 0 ref $self->{'_spelledquery'}{'Replaced'} ? :
421 0 0 unless $self->data_parsed
423 0 0 unless exists $self->{'_globalqueries_it'}
430 0 8 unless $self->data_parsed
431 7 1 ref $self->{'_globalqueries'} ? :
443 0 0 unless ($self->data_parsed or $self->is_lazy)
447 0 0 unless exists $self->{'_docsums_it'}
454 0 4 if ($self->is_lazy)
458 0 4 unless $self->data_parsed
459 4 0 ref $self->{'_docsums'} ? :
471 1 2 unless $self->data_parsed
473 3 0 $self->{'_available_databases'} ? :
480 0 2 unless $self->data_parsed
487 0 2 unless $self->data_parsed
494 0 2 unless $self->data_parsed
496 0 1 exists $self->{'_menu'} ? :
1 1 exists $self->{'_menuname'} ? :
503 0 2 unless $self->data_parsed
510 0 0 unless $self->data_parsed
512 0 0 unless exists $self->{'_fieldinfo_it'}
519 0 2 unless $self->data_parsed
520 1 1 ref $self->{'_fieldinfo'} ? :
528 0 0 unless $self->data_parsed
530 0 0 unless exists $self->{'_linkinfo_it'}
537 0 2 unless $self->data_parsed
538 1 1 ref $self->{'_linkinfo'} ? :
559 0 0 unless ($self->data_parsed or $self->is_lazy)
563 0 0 unless exists $self->{'_linksets_it'}
572 0 52 if ($self->is_lazy)
576 0 52 unless $self->data_parsed
577 52 0 ref $self->{'_linksets'} ? :
589 11 0 if $self->eutil eq 'elink'
610 0 0 if ($self->is_lazy)
615 0 0 if (exists $VALID_ITERATORS{$arg}) { }
0 0 elsif ($arg eq 'all') { }
620 0 0 if exists $$self{'_' . $it . '_it'}
630 0 4 if (not $obj) { }
0 4 elsif (not exists $VALID_ITERATORS{$obj}) { }
636 0 4 if ($self->is_lazy) { }
637 0 0 $self->eutil eq 'esummary' ? :
640 0 0 unless (@{$self->{$type};})
644 0 0 if ($cb) { }
645 0 0 &$cb($obj) ? :
658 0 2 if ($cb) { }
659 0 0 if (my $d = &$cb($self->{$loc}[$current])) { }
679 0 4 if ($cb)
680 0 0 if $cb eq 'reset'
681 0 0 if ref $cb ne 'CODE'
710 0 0 if (not $cb) { }
712 0 0 unless exists $HANDLER{$type}
715 0 0 if ref $cb ne 'CODE'
719 0 0 if $file and $fh
720 0 0 $file ? :
723 0 0 if ($type eq 'all') { }
725 0 0 if $string
729 0 0 unless $self->can($it)
732 0 0 if $string
751 1 0 if ($type eq 'GLOB') { }
0 0 elsif ($type eq 'HTTP::Response') { }
758 0 1 if ($temp =~ /^/)
773 0 22 if ($@)