Branch Coverage

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


line true false branch
179 0 1754 if exists $KEY_ALIASES{$key}
181 0 1754 unless $GET_SET_KEYS{$key}
186 7 1747 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 656 scalar @_ ? :
0 0 scalar @_ ? :
0 0 scalar @_ ? :
0 39 scalar @_ ? :
0 0 scalar @_ ? :
3 1 scalar @_ ? :
234 0 29 wantarray ? :
255 1 6 unless $GET_SET_KEYS{$key}
325 23 8 unless defined $wait_for
342 40 654 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 697 4 $self->total_count ? :
535 0 30 if $self->total_count
539 0 30 if scalar keys %{$$self{'id_opts'};}
566 1 231 if (&HTTP::Async::time() > $hashref->{'timeout_at'} or &HTTP::Async::time() > $hashref->{'finish_by'})
587 169 62 if ($tmp->{'code'}) { }
590 59 110 unless $n
609 1 61 if ($@)
622 61 0 if ($code)
640 59 171 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 201 7321 if $seen_ids{$id}
733 3 7318 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'}