Condition Coverage

lib/Kafka/Producer.pm
Criterion Covered Total %
condition 49 76 64.4


and 3 conditions

line !l l&&!r l&&r condition
214 179 253 0 exists $p{$_} and $self->{$_} = $p{$_}
221 7 1 80 $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'}) and not utf8::is_utf8($self->{'ClientId'})
223 10 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1
10 0 70 defined &_NUMBER($self->{'Timeout'}) and int $self->{'Timeout'} * 1000 >= 1 and int $self->{'Timeout'} * 1000 <= $Kafka::Producer::MAX_INT32
226 0 10 60 defined $required_acks and &isint($required_acks)
10 5 55 defined $required_acks and &isint($required_acks) and $required_acks == $Kafka::Producer::NOT_SEND_ANY_RESPONSE || $required_acks == $Kafka::Producer::WAIT_WRITTEN_TO_LOCAL_LOG || $required_acks == $Kafka::Producer::BLOCK_UNTIL_IS_COMMITTED
302 0 7 5063 defined $topic and $topic eq '' || defined &_STRING($topic)
7 1 5062 defined $topic and $topic eq '' || defined &_STRING($topic) and not utf8::is_utf8($topic)
304 0 10 5052 defined $partition and &isint($partition)
10 0 5052 defined $partition and &isint($partition) and $partition >= 0
315 1 2 10039 defined $message and $message eq '' || defined &_STRING($message) && !utf8::is_utf8($message)
327 0 0 0 defined &_STRING($key) and not utf8::is_utf8($key)
332 0 1 0 defined &_STRING($keys) and not utf8::is_utf8($keys)

or 2 conditions

line l !l condition
216 47 61 $self->{'ClientId'} //= 'producer'
362 0 0 $keys->[$key_index] // ''

or 3 conditions

line l !l&&r !l&&!r condition
221 0 81 7 $self->{'ClientId'} eq '' || defined &_STRING($self->{'ClientId'})
226 59 1 0 $required_acks == $Kafka::Producer::NOT_SEND_ANY_RESPONSE || $required_acks == $Kafka::Producer::WAIT_WRITTEN_TO_LOCAL_LOG || $required_acks == $Kafka::Producer::BLOCK_UNTIL_IS_COMMITTED
302 0 5063 7 $topic eq '' || defined &_STRING($topic)
306 26 5021 5 defined &_STRING($messages) or &_ARRAY($messages)
308 5019 22 6 not defined $keys or defined &_STRING($keys)
5041 0 6 not defined $keys or defined &_STRING($keys) or &_ARRAY($keys)
311 5026 3 12 not defined $compression_codec or $known_compression_codecs{$compression_codec}
315 0 10039 2 $message eq '' || defined &_STRING($message) && !utf8::is_utf8($message)
327 0 0 0 not defined $key or $key eq ''
0 0 0 not defined $key or $key eq '' or defined &_STRING($key) and not utf8::is_utf8($key)
332 0 0 1 $keys eq '' or defined &_STRING($keys) and not utf8::is_utf8($keys)