Branch Coverage

blib/lib/HTTP/OAI/Response.pm
Criterion Covered Total %
branch 54 70 77.1


line true false branch
22 8 0 defined $content ? :
33 0 20 if defined &CGI::self_url
71 0 12 if (defined $self->{'onRecord'}) { }
77 0 12 unless defined $list
83 31 0 if $code != 0
91 1 5 if ($@)
103 0 3 if ($@)
114 0 1 if ($self->xslt)
121 1 0 if (not defined $self->version or $self->version eq '2.0') { }
0 0 elsif ($self->version eq '2.0s') { }
128 1 0 if ($self->error) { }
0 0 elsif ($self->content) { }
176 18 464 if ($self->{'Depth'} == 1) { }
43 421 elsif ($self->{'Depth'} == 2) { }
179 1 17 unless (defined $self->version)
186 9 8 if ($self->version eq '2.0s')
188 3 6 if ($self->verb eq 'ListIdentifiers' or $self->verb eq 'GetRecord') { }
1 5 elsif ($self->verb eq 'ListSets') { }
204 2 41 if ($elem eq 'error') { }
16 25 elsif ($elem =~ /^GetRecord|Identify|ListIdentifiers|ListMetadataFormats|ListRecords|ListSets$/ and !defined($self->verb) || $elem eq $self->verb) { }
215 7 9 if ($self->version eq '2.0s' and $self->verb eq 'ListRecords') { }
218 4 3 if ($metadataPrefix eq $self->headers->header('metadataPrefix'))
243 43 430 if ($self->{'Depth'} == 2)
246 7 36 if ($elem eq 'responseDate' or $elem eq 'requestURL') { }
7 29 elsif ($elem eq 'request') { }
2 27 elsif ($elem eq 'error') { }
7 34 elsif (defined $self->get_handler and $self->version eq '2.0s') { }
260 2 0 unless ($error->code =~ /^noRecordsMatch|noSetHierarchy$/)
270 3 4 if (defined(my $verb = $self->{'_verb'}))
272 1 2 if ($verb eq 'ListIdentifiers') { }
2 0 elsif ($verb eq 'GetRecord') { }
283 1 1 unless (defined(($content->item)[0]))
296 9 457 if ($self->{'Depth'} == 1)
298 1 0 if ($self->version eq '2.0s' and not $self->error and not $self->content)
305 1 8 if (not $self->content and defined(my $verb = $self->verb))