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 90 102 0 $self->{'pipeline'} && $self->{'can_pipeline'} && (!$self->{'max_in_flight'} || $self->{'requests_in_flight'} < $self->{'max_in_flight'})
109 8 0 102 @$queue and $self->is_idle
111 81 1 19 @$queue and $self->should_pipeline
168 13 104 2 not $closed and length $$buffref
203 0 0 134 ref $req and $req->isa("HTTP::Request")
300 41 91 2 defined $authority and my($user, $pass, $host) = $authority =~ /^(.*?):(.*)@(.*)$/u
329 130 1 3 $write_request_body and not $expect_continue
363 1 124 1 length $$buffref >= 4 and not $$buffref =~ /^HTTP/u
397 0 7 116 $protocol =~ m[^HTTP/1\.(\d+)$]u and $1 >= 1
419 120 0 2 $content_encoding and $decoder = "Net::Async::HTTP"->can_decode($content_encoding)
433 99 0 0 $max and $max < $self->{'max_in_flight'}
439 84 2 0 $decoder and not eval { do { $chunk = &$decoder($chunk); 1 } }
461 118 2 0 $decoder and not eval { do { $final = &$decoder(); 1 } }
468 118 2 0 defined $final and length $final
498 115 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 88 46 $req->protocol || 'HTTP/1.1'
428 0 99 $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 123 $method eq "POST" or $method eq "PUT"
11 2 121 $method eq "POST" or $method eq "PUT" or length $req->content
265 4 1 129 $stall_timer or $args{'on_body_write'}
425 68 54 0 $header->header('Connection') || ($self->{'can_pipeline'} ? 'keep-alive' : 'close')
490 2 0 120 $req->method eq "HEAD" or $code =~ /^1..$/u
2 0 120 $req->method eq "HEAD" or $code =~ /^1..$/u or $code eq 204
0 1 119 $req->method eq "HEAD" or $code =~ /^1..$/u or $code eq 204 or $code eq 304