Branch Coverage

blib/lib/AnyEvent/RipeRedis.pm
Criterion Covered Total %
branch 49 174 28.1


line true false branch
109 0 25 defined $params{'database'} ? :
110 0 25 exists $params{'utf8'} ? :
112 9 16 exists $params{'reconnect'} ? :
130 19 0 unless ($self->{'lazy'})
158 21 3 if (@_)
161 13 8 if (defined $on_error) { }
192 81 9 if (@_)
195 12 14 if (defined $seconds and !&looks_like_number($seconds) || $seconds < 0)
211 8 12 if (@_)
244 17 10 if (defined $self->{'connection_timeout'})
260 0 0 unless (defined $self->{'password'})
263 0 0 if ($self->{'database'} == 0)
267 0 0 if ($self->{'_auth_state'} == 1) { }
0 0 elsif ($self->{'_db_selection_state'} == 1) { }
278 0 0 if (defined $self->{'on_connect'})
306 0 0 if (@{$self->{'_processing_queue'};}) { }
354 0 0 if $handle->destroyed
359 0 0 if (defined $str_len) { }
360 0 0 if (length $handle->{'rbuf'} < $str_len + 2)
366 0 0 if ($self->{'utf8'})
375 0 0 if ($eol_pos < 0)
383 0 0 if ($type ne '+' and $type ne ':')
384 0 0 if ($type eq '$') { }
0 0 elsif ($type eq '*') { }
0 0 elsif ($type eq '-') { }
385 0 0 if ($reply >= 0)
393 0 0 if ($reply > 0) { }
0 0 elsif ($reply == 0) { }
413 0 0 if ($reply =~ /^([A-Z]{3,}) /)
414 0 0 if (exists $ERR_PREFS_MAP{$1})
431 0 0 if (defined $err_code)
432 0 0 unless (ref $reply)
438 0 0 if (--$curr_buf->{'chunks_cnt'} > 0)
461 0 25 if (ref $args->[-1] eq 'HASH') { }
466 16 9 if (ref $args->[-1] eq 'CODE')
467 0 16 if (exists $SUB_CMDS{$cmd_name}) { }
477 0 25 $cmd_name eq 'eval_cached' ? :
488 9 16 unless (defined $cmd->{'on_reply'})
494 1 0 if (defined $err)
508 7 0 if ($self->{'_multi_mode'} and exists $SUBUNSUB_CMDS{$cmd->{'name'}} || exists $NEED_POSTPROCESS{$cmd->{'name'}})
516 2 16 if (exists $NEED_PREPROCESS{$cmd->{'name'}})
517 1 1 if ($cmd->{'name'} eq 'multi') { }
0 1 elsif ($cmd->{'name'} eq 'exec' or $cmd->{'name'} eq 'discard') { }
0 1 elsif ($cmd->{'name'} eq 'eval_cached') { }
527 0 0 unless (exists $EVAL_CACHE{$script})
534 1 0 if (exists $SUB_CMDS{$cmd->{'name'}} and not defined $cmd->{'on_message'})
540 0 0 if (@{$cmd->{'args'};})
546 17 0 unless ($self->{'_ready'})
547 13 4 if (defined $self->{'_handle'}) { }
0 4 elsif ($self->{'lazy'}) { }
0 4 elsif ($self->{'reconnect'}) { }
548 0 13 if ($self->{'_connected'})
549 0 0 if ($self->{'_auth_state'} == 3) { }
0 0 elsif ($self->{'_auth_state'} == 1) { }
550 0 0 if ($self->{'_db_selection_state'} == 1)
564 0 0 if (defined $self->{'reconnect_interval'} and $self->{'reconnect_interval'} > 0) { }
567 0 0 unless (defined $self->{'_reconnect_timer'})
610 0 0 defined $token ? :
622 0 0 if (defined $self->{'read_timeout'} and not @{$self->{'_processing_queue'};})
649 0 0 if (defined $err)
658 0 0 if ($self->{'_db_selection_state'} == 1) { }
686 0 0 if (defined $err)
722 0 0 if (defined $err_code) { }
0 0 elsif ($self->{'_channel_cnt'} + $self->{'_pchannel_cnt'} > 0 and ref $reply and exists $MESSAGE_TYPES{$reply->[0]}) { }
744 0 0 unless (defined $cmd)
754 0 0 if ($cmd->{'name'} eq 'eval_cached' and $err_code == 11)
765 0 0 if (ref $reply) { }
784 0 0 unless (defined $cmd)
798 0 0 $msg->[0] eq 'pmessage' ? :
810 0 0 unless (defined $cmd)
820 0 0 if (exists $SUBUNSUB_CMDS{$cmd->{'name'}})
821 0 0 if ($cmd->{'name'} eq 'subscribe') { }
0 0 elsif ($cmd->{'name'} eq 'psubscribe') { }
0 0 elsif ($cmd->{'name'} eq 'unsubscribe') { }
830 0 0 unless (defined $cmd->{'reply_cnt'})
838 0 0 unless (defined $cmd->{'reply_cnt'})
849 0 0 if (not defined $cmd->{'reply_cnt'} or --$cmd->{'reply_cnt'} == 0)
854 0 0 if (exists $NEED_POSTPROCESS{$cmd->{'name'}})
855 0 0 if ($cmd->{'name'} eq 'info' or $cmd->{'name'} eq 'cluster_info') { }
0 0 elsif ($cmd->{'name'} eq 'select') { }
885 11 0 if (defined $self->{'_handle'})
891 0 11 if ($was_connected and defined $self->{'on_disconnect'})
926 3 8 if (not defined $err and @queued_commands)
931 11 0 if (defined $err)
937 0 11 if (%channels and $err_code != 5)
998 8 9 if (defined $self->{'_handle'})
1002 11 6 if (defined $self->{'_processing_queue'})