Condition Coverage

lib/MojoX/HTTP/Async.pm
Criterion Covered Total %
condition 59 111 53.1


and 3 conditions

line !l l&&!r l&&r condition
339 17 0 24 not $_->{'is_busy'} and $_->{'socket'}
414 5 3 14 not $slot and $self->{'slots'} > scalar @{$self->{'_conns'}}
421 0 1 1 &blessed($request_or_uri) and $request_or_uri->isa("Mojo::URL")
496 19 0 0 $scheme and $required_scheme ne $scheme
536 17 0 17 $sent_bytes < $msg_len and $attempts--
556 0 19 0 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
572 0 6 1 $! and not $!{'EAGAIN'}
6 0 1 $! and not $!{'EAGAIN'} and not $!{'EWOULDBLOCK'}
0 0 6 $response and $response->code
592 0 0 0 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
7 0 0 not $slot->{'tx'} and ($slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'})
642 0 62555 0 $exp_ts and &MojoX::HTTP::Async::time() >= $exp_ts
695 98069 0 7 $nfound and vec($read_handles, $sock_no, 1) == 1
701 0 98064 5 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
0 98064 5 not $slot->{'tx'} and ($slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'})
750 2 4 3 $keep_ts && $slot_exp_ts <= $now
752 9 0 0 $self->{'debug'} and $is_outdated

or 2 conditions

line l !l condition
225 20 0 $self->{'sol_socket'} // {}
231 17 0 $self->{'sol_tcp'} // {}
252 3 0 $self->{'ssl_opts'} // {}
540 0 0 $! // "Unknown error"
550 0 0 $! // "sent message is shorter than original"
733 5 0 $self->{'inactivity_conn_ts'} // 0

or 3 conditions

line l !l&&r !l&&!r condition
288 10 5 0 $self->{'peer_addr'} //= pack_sockaddr_in($self->{'port'}, $host_addr)
289 10 5 0 $self->{'proto'} //= getprotobyname "tcp"
324 0 0 70497 $!{'EPIPE'} || $!{'ECONNRESET'} || $!{'ECONNREFUSED'} || $!{'ECONNABORTED'}
421 17 1 1 not ref $request_or_uri or &blessed($request_or_uri) and $request_or_uri->isa("Mojo::URL")
455 6 0 0 $slot->{'request'} //= "Mojo::Message::Request"->new
457 0 6 0 $slot->{'tx'} //= "Mojo::Transaction::HTTP"->new("req", $slot->{'request'}, "res", "Mojo::Message::Response"->new)
511 0 19 0 $timeout //= $self->{'request_timeout'}
539 0 0 17 $! or not defined $bytes
565 0 0 7 $slot->{'tx'} or not $slot->{'is_busy'}
568 0 7 0 $slot->{'tmp_response'} // "Mojo::Message::Response"->new
609 98070 0 29320 $slot->{'is_busy'} or $slot->{'tx'}
643 7 5 62543 $response = $self->next_response or not $self->not_empty
658 12 0 70466 $self->_get_response_from_ready_slot // $self->_get_response_from_slot
678 0 6 127392 $_->{'tx'} || $_->{'reconnect_is_required'}
749 0 9 0 $slot->{'last_response_ts'} || $slot->{'connected_ts'}
754 2 3 4 $slot->{'reconnect_is_required'} or $is_outdated