Branch Coverage

blib/lib/HTTP/AnyUA.pm
Criterion Covered Total %
branch 42 90 46.6


line true false branch
27 0 19 if $ENV{'PERL_HTTP_ANYUA_DEBUG'}
36 2 8 if @_ % 2
38 1 9 unless $args{'ua'}
44 10 17 if defined $args{$attr}
53 1 8 if defined $args{'response_is_future'}
59 0 32 unless +(shift())->{'ua'}
66 1 26 if (defined $val) { }
24 2 elsif (not defined $self->{'response_is_future'} and $self->{'backend'}) { }
67 1 0 $val ? :
72 1 0 if $self->{'response_is_future'}
77 1 23 if $self->{'response_is_future'}
87 54 7 if defined $self->{'backend'}
99 0 15 unless @_ == 3 or @_ == 4 and ref $args eq 'HASH'
103 0 15 if (my $err = $@)
123 0 0 unless @_ == 2 or @_ == 3 and ref $args eq 'HASH'
0 3 unless @_ == 2 or @_ == 3 and ref $args eq 'HASH'
0 0 unless @_ == 2 or @_ == 3 and ref $args eq 'HASH'
0 2 unless @_ == 2 or @_ == 3 and ref $args eq 'HASH'
0 0 unless @_ == 2 or @_ == 3 and ref $args eq 'HASH'
130 0 0 unless @_ == 3 or @_ == 4 and ref $args eq 'HASH'
150 0 0 unless @_ == 3 or @_ == 4 and ref $args eq 'HASH'
155 0 0 if (-e $file and my $mtime = (stat $file)[9])
162 0 0 unless sysopen my $fh, $tempfile, 193
172 0 0 unless close $fh
175 0 0 if ($resp->{'success'})
176 0 0 unless rename $tempfile, $file
179 0 0 if ($lm and my $mtime = HTTP::AnyUA::Util::parse_http_date($lm))
190 0 0 if ($self->response_is_future) { }
193 0 0 $future->is_done ? :
195 0 0 if ($resp->{'success'}) { }
213 4 0 unless (ref $class)
214 4 0 unless $class =~ s/^\+//
227 0 6 unless @_ == 3
229 6 0 if ($backend_class) { }
230 0 6 unless $backend_class =~ s/^\+//
244 1 14 if ($self->response_is_future and not $self->backend->response_is_future)
246 0 1 if ($resp->{'success'}) { }
267 0 7 unless my $ua = shift() || $self->ua
273 1 6 if ($ua_type) { }
274 0 1 if $REGISTERED_BACKENDS{$ua_type}
278 1 0 unless (@BACKENDS)
287 1 6 if $ua->isa($plugin)
291 6 0 if $REGISTERED_BACKENDS{$ua}
296 7 0 if (eval { do { $self->_module_loader->load($class); 1 } }) { }
314 0 10 if (not $val and $self->{'backend'} and $self->backend->response_is_future)