Condition Coverage

lib/MojoX/HTTP/Async.pm
Criterion Covered Total %
condition 48 111 43.2


and 3 conditions

line !l l&&!r l&&r condition
315 8 0 12 not $_->{'is_busy'} and $_->{'socket'}
390 2 2 6 not $slot and $self->{'slots'} > scalar @{$self->{'_conns'}}
397 0 0 0 &blessed($request_or_uri) and $request_or_uri->isa("Mojo::URL")
472 8 0 0 $scheme and $required_scheme ne $scheme
512 8 0 8 $sent_bytes < $msg_len and $attempts--
532 0 8 0 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
548 0 4 0 $! and not $!{'EAGAIN'}
4 0 0 $! and not $!{'EAGAIN'} and not $!{'EWOULDBLOCK'}
0 0 4 $response and $response->code
568 0 0 0 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
4 0 0 not $slot->{'tx'} and ($slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'})
618 0 13765 0 $exp_ts and &MojoX::HTTP::Async::time() >= $exp_ts
671 18910 1 4 $nfound and vec($read_handles, $sock_no, 1) == 1
677 0 18907 4 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
0 18907 4 not $slot->{'tx'} and ($slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'})
724 0 2 0 $keep_ts && $slot_exp_ts <= $now
726 2 0 0 $self->{'debug'} and $is_outdated

or 2 conditions

line l !l condition
201 8 0 $self->{'sol_socket'} // {}
207 0 0 $self->{'sol_tcp'} // {}
228 0 0 $self->{'ssl_opts'} // {}
516 0 0 $! // "Unknown error"
526 0 0 $! // "sent message is shorter than original"
707 1 0 $self->{'inactivity_conn_ts'} // 0

or 3 conditions

line l !l&&r !l&&!r condition
264 5 1 0 $self->{'peer_addr'} //= pack_sockaddr_in($self->{'port'}, $host_addr)
265 5 1 0 $self->{'proto'} //= getprotobyname "tcp"
300 0 0 14311 $!{'EPIPE'} || $!{'ECONNRESET'} || $!{'ECONNREFUSED'} || $!{'ECONNABORTED'}
397 8 0 0 not ref $request_or_uri or &blessed($request_or_uri) and $request_or_uri->isa("Mojo::URL")
431 4 0 0 $slot->{'request'} //= "Mojo::Message::Request"->new
433 0 4 0 $slot->{'tx'} //= "Mojo::Transaction::HTTP"->new("req", $slot->{'request'}, "res", "Mojo::Message::Response"->new)
487 0 8 0 $timeout //= $self->{'request_timeout'}
515 0 0 8 $! or not defined $bytes
541 0 0 4 $slot->{'tx'} or not $slot->{'is_busy'}
544 0 4 0 $slot->{'tmp_response'} // "Mojo::Message::Response"->new
585 18909 0 9693 $slot->{'is_busy'} or $slot->{'tx'}
619 6 4 13755 $response = $self->next_response or not $self->not_empty
634 8 0 14298 $self->_get_response_from_ready_slot // $self->_get_response_from_slot
654 0 5 28607 $_->{'tx'} || $_->{'reconnect_is_required'}
723 0 2 0 $slot->{'last_response_ts'} || $slot->{'connected_ts'}
728 2 0 0 $slot->{'reconnect_is_required'} or $is_outdated