Condition Coverage

blib/lib/Net/Async/HTTP/Connection.pm
Criterion Covered Total %
condition 62 84 73.8


and 2 conditions

line l !l condition
152 0 1 shift @{$$self{"request_queue"};} and next

and 3 conditions

line !l l&&!r l&&r condition
82 92 104 0 $self->{'pipeline'} && $self->{'can_pipeline'} && (!$self->{'max_in_flight'} || $self->{'requests_in_flight'} < $self->{'max_in_flight'})
109 8 0 104 @$queue and $self->is_idle
111 83 1 19 @$queue and $self->should_pipeline
168 13 106 2 not $closed and length $$buffref
203 0 0 136 ref $req and $req->isa("HTTP::Request")
300 41 93 2 defined $authority and my($user, $pass, $host) = $authority =~ /^(.*?):(.*)@(.*)$/u
329 132 1 3 $write_request_body and not $expect_continue
363 1 126 1 length $$buffref >= 4 and not $$buffref =~ /^HTTP/u
397 0 7 118 $protocol =~ m[^HTTP/1\.(\d+)$]u and $1 >= 1
419 122 0 2 $content_encoding and $decoder = "Net::Async::HTTP"->can_decode($content_encoding)
433 101 0 0 $max and $max < $self->{'max_in_flight'}
439 86 2 0 $decoder and not eval {
461 120 2 0 $decoder and not eval {
468 120 2 0 defined $final and length $final
498 117 0 4 defined $transfer_encoding and $transfer_encoding eq "chunked"
537 6 0 10 not defined $chunk_length and $$buffref =~ s/^(.*?)$CRLF//u
555 0 0 6 defined $chunk_length and length $$buffref >= $chunk_length + 2

or 2 conditions

line l !l condition
310 90 46 $req->protocol || 'HTTP/1.1'
428 0 101 $header->header('Keep-Alive') || ''

or 3 conditions

line l !l&&r !l&&!r condition
173 30 0 1 $closed or not length $$buffref
191 23 7 6 $head->is_done or $head->f->is_ready
212 4 7 125 $method eq "POST" or $method eq "PUT"
11 2 123 $method eq "POST" or $method eq "PUT" or length $req->content
265 4 1 131 $stall_timer or $args{'on_body_write'}
425 68 56 0 $header->header('Connection') || ($self->{'can_pipeline'} ? 'keep-alive' : 'close')
490 2 0 122 $req->method eq "HEAD" or $code =~ /^1..$/u
2 0 122 $req->method eq "HEAD" or $code =~ /^1..$/u or $code eq 204
0 1 121 $req->method eq "HEAD" or $code =~ /^1..$/u or $code eq 204 or $code eq 304