Branch Coverage

blib/lib/HTTP/Async.pm
Criterion Covered Total %
branch 82 116 70.6


line true false branch
179 0 1757 if exists $KEY_ALIASES{$key}
181 0 1757 unless $GET_SET_KEYS{$key}
186 7 1750 if $id and defined $self->{'id_opts'}{$id}{$key}
196 2 22 if exists $KEY_ALIASES{$key}
198 1 23 unless $GET_SET_KEYS{$key}
199 23 0 if @_
204 1 0 scalar @_ ? :
0 0 scalar @_ ? :
0 0 scalar @_ ? :
6 12 scalar @_ ? :
2 23 scalar @_ ? :
0 0 scalar @_ ? :
1 657 scalar @_ ? :
0 0 scalar @_ ? :
0 0 scalar @_ ? :
0 39 scalar @_ ? :
0 0 scalar @_ ? :
3 1 scalar @_ ? :
234 0 29 wantarray ? :
255 1 5 unless $GET_SET_KEYS{$key}
325 23 8 unless defined $wait_for
342 40 655 if $resp_and_id or &HTTP::Async::time() > $end_time
351 9 33 unless $resp_and_id
359 0 33 wantarray ? :
459 5 3 unless ($hashref)
463 3 7 if ($hashref)
469 2 6 unless $hashref
489 1 1 if $self->empty
516 698 4 $self->total_count ? :
535 0 30 if $self->total_count
539 0 30 if scalar keys %{$$self{'id_opts'};}
566 1 233 if (&HTTP::Async::time() > $hashref->{'timeout_at'} or &HTTP::Async::time() > $hashref->{'finish_by'})
587 169 64 if ($tmp->{'code'}) { }
590 59 110 unless $n
609 1 63 if ($@)
622 63 0 if ($code)
640 59 173 if ($tmp->{'is_complete'})
650 30 29 if $hashref->{'previous'}
654 1 58 if ($jar)
666 30 29 if ($response->is_redirect and $hashref->{'redirects_left'} > 0 and $get_or_head || !($code =~ /^30[127]$/) and $code != 304 and $code != 305) { }
680 0 30 unless $uri and ref $uri and $loc and not ref $loc
693 0 0 if ($request->header('Referer') and $hashref->{'request'}->uri->scheme eq 'https' and $request->uri->scheme eq 'http')
701 0 30 if ($code == 303 and not $get_or_head)
729 203 9478 if $seen_ids{$id}
733 3 9475 if (&HTTP::Async::time() > $hashref->{'timeout_at'} or &HTTP::Async::time() > $hashref->{'finish_by'})
790 1 68 if ($jar)
812 3 66 $args{'PeerAddr'} || $args{'PeerPort'} ? :
819 1 68 if ($peer_address)
826 0 69 if ($uri->scheme and $uri->scheme eq 'https' and not $request_is_to_proxy) { }
0 138 elsif ($uri->scheme and $uri->scheme eq 'https' and $request_is_to_proxy) { }
832 0 0 if $@
836 0 0 if $ssl_options
851 2 67 unless ($s)
870 3 64 $request_is_to_proxy ? :
874 0 67 unless $s->write_request($request->method, $request_uri, %headers, $request->content)
896 37 30 unless exists $entry->{'redirects_left'}
908 45 24 unless $url =~ m[^/]
938 0 7 if $args{'previous'}