Branch Coverage

blib/lib/Net/OAI/Harvester.pm
Criterion Covered Total %
branch 57 96 59.3


line true false branch
183 0 22 unless $normalOpts{'BASEURL'}
189 1 21 if ($normalOpts{'USERAGENT'}) { }
198 1 21 if ($normalOpts{'DUMPDIR'})
200 0 1 unless -d $dir
232 5 1 if $identity->{'error'}
238 0 1 if ($@)
270 1 1 defined $opts{$_} ? :
274 0 2 if $list->{'error'}
280 0 2 if ($@)
335 0 8 unless defined $opts{'identifier'}
337 0 8 unless exists $opts{'metadataPrefix'}
339 0 2 if $opts{'recordHandler'} and $opts{'metadataHandler'}
344 16 0 defined $opts{$_} ? :
351 0 8 if $record->{'error'}
357 0 8 if ($@)
448 0 9 unless exists $opts{'metadataPrefix'} or defined $opts{'resumptionToken'}
450 0 2 if $opts{'recordHandler'} and $opts{'metadataHandler'}
455 12 33 defined $opts{$_} ? :
462 0 9 if $list->{'error'}
469 0 9 if ($@)
472 7 2 $token->token ? :
522 0 6 unless exists $opts{'metadataPrefix'} or defined $opts{'resumptionToken'}
526 9 21 defined $opts{$_} ? :
530 0 6 if $list->{'error'}
537 0 6 if ($@)
540 5 1 $token->token ? :
583 0 1 defined $opts{$_} ? :
587 0 1 if $list->{'error'}
594 0 1 if ($@)
597 0 1 $token->token ? :
617 0 0 if ($url)
637 22 1 if ($ua)
638 0 22 unless $ua->isa('LWP::UserAgent')
651 2 30 if ($self->{'dumpDir'}) { }
665 5 27 if ($response->is_error)
681 27 0 if (my $ct = $response->header('Content-Type'))
683 0 27 unless ($ct =~ m[^text/xml(;|$)])
690 27 0 if ($ct =~ /; charset=(\S+)/)
692 0 27 unless $cs =~ /^utf-8/i
712 0 29 if $@
714 29 0 if ($parser and ref $parser)
722 0 0 if $@
723 0 0 if ($parser and ref $parser)
741 205 12 if (ref $package_or_instance) { }
742 0 205 unless $package_or_instance->isa('XML::SAX::Base')
747 0 12 if $@
750 0 12 unless grep {'XML::SAX::Base';} eval '@' . $package_or_instance . '::ISA'
757 6632 0 unless $DEBUG