Branch Coverage

blib/lib/AnyEvent/Redis/RipeRedis.pm
Criterion Covered Total %
branch 46 166 27.7


line true false branch
123 0 30 ref $proto ? :
129 0 30 defined $params{'database'} ? :
130 13 17 exists $params{'reconnect'} ? :
143 0 46 if (not exists $hdl_params->{$name} and defined $params{$name})
163 23 0 unless ($self->{'_lazy_conn_st'})
195 0 0 unless (exists $EVAL_CACHE{$cmd->{'script'}})
216 33 3 if (@_)
219 4 29 if (defined $enc) { }
222 2 2 unless (defined $self->{'encoding'})
237 25 3 if (@_)
240 8 17 if (defined $on_error) { }
270 1 0 if (exists $SUB_CMDS{$cmd->{'kwd'}} and not defined $cmd->{'on_message'})
274 0 0 if ($self->{'_txn_lock'})
289 0 0 if (defined $cmd->{'on_done'})
307 93 9 if (@_)
310 12 18 if (defined $seconds and !&looks_like_number($seconds) || $seconds < 0)
326 8 12 if (@_)
359 25 10 if (defined $self->{'connection_timeout'})
375 0 0 unless (defined $self->{'password'})
378 0 0 if ($self->{'database'} == 0)
382 0 0 if ($self->{'_auth_st'} == 1) { }
0 0 elsif ($self->{'_select_db_st'} == 1) { }
393 0 0 if (defined $self->{'on_connect'})
420 0 0 if (@{$self->{'_processing_queue'};}) { }
465 0 0 if ($handle->destroyed)
472 0 0 if (defined $str_len) { }
473 0 0 if (length $handle->{'rbuf'} < $str_len + 2)
479 0 0 if (defined $self->{'encoding'})
487 0 0 if ($eol_pos < 0)
495 0 0 if ($type ne '+' and $type ne ':')
496 0 0 if ($type eq '$') { }
0 0 elsif ($type eq '*') { }
0 0 elsif ($type eq '-') { }
497 0 0 if ($reply >= 0)
506 0 0 if ($reply > 0) { }
0 0 elsif ($reply == 0) { }
526 0 0 if ($reply =~ /^([A-Z]{3,}) /)
527 0 0 if (exists $ERR_PREFS_MAP{$1})
543 0 0 if (defined $err_code)
544 0 0 unless (ref $reply)
551 0 0 if (--$curr_buf->{'chunks_cnt'} > 0)
574 20 1 if (ref $args->[-1] eq 'HASH') { }
579 0 1 if (ref $args->[-1] eq 'CODE')
580 0 0 if (exists $SUB_CMDS{$kwd}) { }
598 20 0 unless ($self->{'_ready_to_write'})
599 16 4 if (defined $self->{'_handle'}) { }
0 4 elsif ($self->{'_lazy_conn_st'}) { }
0 4 elsif ($self->{'reconnect'}) { }
600 0 16 if ($self->{'_connected'})
601 0 0 if ($self->{'_auth_st'} == 3) { }
0 0 elsif ($self->{'_auth_st'} == 1) { }
602 0 0 if ($self->{'_select_db_st'} == 1)
616 0 0 if (defined $self->{'min_reconnect_interval'} and $self->{'min_reconnect_interval'} > 0) { }
619 0 0 unless (defined $self->{'_reconnect_timer'})
659 0 0 if (not defined $token) { }
0 0 elsif (defined $self->{'encoding'} and &is_utf8($token)) { }
670 0 0 if (defined $self->{'read_timeout'} and not @{$self->{'_processing_queue'};})
695 0 0 if ($self->{'_select_db_st'} == 1) { }
759 0 0 if (defined $err_code) { }
0 0 elsif ($self->{'_channel_cnt'} > 0 and ref $reply and exists $MSG_TYPES{$reply->[0]}) { }
762 0 0 unless (defined $cmd)
771 0 0 ref $reply ? :
781 0 0 unless (defined $cmd)
792 0 0 $reply->[0] eq 'pmessage' ? :
797 0 0 unless (defined $cmd)
806 0 0 if (not defined $cmd->{'replies_cnt'} or --$cmd->{'replies_cnt'} <= 0)
819 0 18 if ($_[1] == 11 and defined $cmd->{'script'})
828 18 0 if (defined $cmd->{'on_error'}) { }
0 0 elsif (defined $cmd->{'on_reply'}) { }
846 0 0 if (exists $NEED_POSTPROCESS{$cmd->{'kwd'}})
849 0 0 if (exists $SUBUNSUB_CMDS{$kwd}) { }
0 0 elsif ($kwd eq 'info') { }
0 0 elsif ($kwd eq 'select') { }
852 0 0 if (exists $SUB_CMDS{$kwd}) { }
872 0 0 if (defined $cmd->{'on_done'}) { }
0 0 elsif (defined $cmd->{'on_reply'}) { }
896 14 0 if (defined $self->{'_handle'})
908 0 14 if ($was_connected and defined $self->{'on_disconnect'})
934 2 12 if (not defined $err_msg and @unfin_cmds)
939 14 0 if (defined $err_msg)
940 8 6 if (defined $self->{'on_connect_error'} and $err_code == 1) { }
947 0 14 if (%channels and $err_code != 5)
989 9 9 if (defined $self->{'_handle'})