Branch Coverage

blib/lib/HTTP/OAI/UserAgent.pm
Criterion Covered Total %
branch 23 64 35.9


line true false branch
33 0 10 ref $args[0] eq 'CODE' ? :
39 0 10 if (not $args{'force'} and my(@errors) = HTTP::OAI::Repository::validate_request(%args))
49 0 20 unless defined $args{$_} and length $args{$_}
77 1 9 if ($r->is_success and not defined $r->headers->header("Client-Aborted"))
80 0 1 if ($@)
87 8 2 if (defined $r->headers->header("Client-Aborted") and $r->headers->header("Client-Aborted") eq "die")
90 8 0 if ($err eq 'done') { }
106 0 10 if (defined $r and $r->code == 503 || $r->code == 429 and defined(my $timeout = $r->headers->header('Retry-After'))) { }
0 10 elsif (defined $r and $r->is_success and $cnt_len == 0) { }
1 9 elsif ($r->is_error) { }
0 9 elsif ($@) { }
107 0 0 if ($self->{'recursion'}++ > 10)
112 0 0 if (not $timeout or $timeout =~ /\D/ or $timeout < 0 or $timeout > 86400)
122 0 0 if ($self->{'recursion'}++ > 10)
135 0 0 $@ =~ /read timeout/ ? :
151 0 1 if (defined $delay)
153 0 0 if (ref $delay eq "CODE")
157 0 0 if $delay > 0
170 0 0 unless ($SILENT_BAD_CHARS)
183 0 1 if ($IGNORE_BAD_CHARS and length $utf8)
186 0 1 if (length $utf8 > 0)
209 14 0 if (length $utf8 > 0)
217 0 6 if (length $parser->{'content_buffer'} > 4)
221 0 0 if (length $badbytes == 0)
225 0 0 if ($IGNORE_BAD_CHARS)
243 0 10 unless $args{'verb'}
246 9 1 if $uri->scheme eq "file"
248 0 1 if (defined $args{'resumptionToken'} and not $args{'force'}) { }
262 0 0 unless defined $type
263 0 0 if ($type eq 'gzip') { }
265 0 0 unless my $gz = Compress::Zlib::gzopen($response->{'_content_filename'}, "r")
274 0 0 if -1 == $c