Condition Coverage

lib/Kafka/IO.pm
Criterion Covered Total %
condition 47 128 36.7


and 3 conditions

line !l l&&!r l&&r condition
237 52 39 0 exists $p{$_} and $self->{$_} = $p{$_}
305 1 0 1 $sent < $length and $retries++ < $MAX_RETRIES
327 0 1 0 $retries == 1 and $self->_is_close_wait
337 0 0 1 defined $wrote and $wrote > 0
346 0 0 0 $errno != 11 and $errno != 11
0 0 0 $errno == 104 && $^O eq 'freebsd'
0 0 0 $errno != 11 and $errno != 11 and not $errno == 104 && $^O eq 'freebsd'
366 0 0 1 not $errno and defined $sent
0 0 1 not $errno and defined $sent and $sent == $length
420 1 0 1 $len_to_read > 0 and $retries++ < $MAX_RETRIES
446 0 0 1 defined $from_recv and length $buf
452 0 0 0 $errno != 11 and $errno != 11
0 0 0 $errno == 104 && $^O eq 'freebsd'
0 0 0 $errno != 11 and $errno != 11 and not $errno == 104 && $^O eq 'freebsd'
469 0 0 0 defined $from_recv and not $errno
497 0 0 1 not $errno and length $message >= $length
542 0 0 1 $self->{'socket'} and $self->{'_io_select'}
550 0 0 0 !$! && defined $status && length $buf == 0
711 9 0 0 $Kafka::IO::Config{'osname'} eq 'netbsd' and _major_osvers() >= 6
9 0 0 $Kafka::IO::Config{'osname'} eq 'netbsd' and _major_osvers() >= 6 and $Kafka::IO::Config{'longsize'} == 4
746 6 1 1 defined $ip_version and $ip_version == $Kafka::IO::IP_V6
770 1 0 7 $is_v4_fqdn and !defined($ip_version) || $ip_version == $Kafka::IO::IP_V4
784 13 0 0 $is_ip = is_ipv6($name) and not $ip_version
9 1 1 $is_ip = is_ipv4($name) and not $ip_version
785 0 2 0 $ip_version and !$is_ip && is_ipv4($name) || $is_ip && $ip_version == $Kafka::IO::IP_V4
797 1 2 0 $ip_version and !$is_ip && is_ipv6($name) || $is_ip && $ip_version == $Kafka::IO::IP_V6

or 2 conditions

line l !l condition
372 0 0 $errno // 0
0 0 $errno // ''
503 0 0 $errno // 0
0 0 $errno // ''
693 9 0 setsockopt($connection, 1, 21, $timeval) // die("setsockopt SOL_SOCKET, SO_SNDTIMEO: $!\n")
694 9 0 setsockopt($connection, 1, 20, $timeval) // die("setsockopt SOL_SOCKET, SO_RCVTIMEO: $!\n")
783 4 9 $self->{'ip_version'} // 0

or 3 conditions

line l !l&&r !l&&!r condition
286 1 0 0 $self->{'timeout'} // $Kafka::IO::REQUEST_TIMEOUT
372 0 0 0 $error_code // $Kafka::IO::ERROR_CANNOT_SEND
403 1 0 0 $self->{'timeout'} // $Kafka::IO::REQUEST_TIMEOUT
503 0 0 0 $error_code // $Kafka::IO::ERROR_CANNOT_RECV
661 0 9 1 connect $connection, $sockaddr or $!{'EINPROGRESS'}
670 9 0 0 $timeout // $Kafka::IO::REQUEST_TIMEOUT
692 9 0 0 $timeout // $Kafka::IO::REQUEST_TIMEOUT
770 6 1 0 !defined($ip_version) || $ip_version == $Kafka::IO::IP_V4
784 0 2 11 $is_ip = is_ipv6($name) and not $ip_version or $ip_version == $Kafka::IO::IP_V6
1 2 8 $is_ip = is_ipv4($name) and not $ip_version or $ip_version == $Kafka::IO::IP_V4
785 1 0 1 !$is_ip && is_ipv4($name) || $is_ip && $ip_version == $Kafka::IO::IP_V4
797 0 0 2 !$is_ip && is_ipv6($name) || $is_ip && $ip_version == $Kafka::IO::IP_V6