Condition Coverage

lib/MojoX/HTTP/Async.pm
Criterion Covered Total %
condition 58 111 52.2


and 3 conditions

line !l l&&!r l&&r condition
339 17 0 24 not $_->{'is_busy'} and $_->{'socket'}
414 6 3 13 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 0 $! and not $!{'EAGAIN'}
6 0 0 $! 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'}
6 0 0 not $slot->{'tx'} and ($slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'})
642 0 91136 0 $exp_ts and &MojoX::HTTP::Async::time() >= $exp_ts
695 126933 2 6 $nfound and vec($read_handles, $sock_no, 1) == 1
701 0 126929 6 $slot->{'exp_ts'} and &MojoX::HTTP::Async::time() > $slot->{'exp_ts'}
0 126929 6 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 19 0 $self->{'sol_socket'} // {}
231 17 0 $self->{'sol_tcp'} // {}
252 2 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 9 5 0 $self->{'peer_addr'} //= pack_sockaddr_in($self->{'port'}, $host_addr)
289 9 5 0 $self->{'proto'} //= getprotobyname "tcp"
324 0 0 99242 $!{'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 6 $slot->{'tx'} or not $slot->{'is_busy'}
568 0 6 0 $slot->{'tmp_response'} // "Mojo::Message::Response"->new
609 126934 0 57746 $slot->{'is_busy'} or $slot->{'tx'}
643 7 5 91124 $response = $self->next_response or not $self->not_empty
658 12 0 99211 $self->_get_response_from_ready_slot // $self->_get_response_from_slot
678 0 6 184682 $_->{'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