Condition Coverage

blib/lib/Redis.pm
Criterion Covered Total %
condition 31 127 24.4


and 3 conditions

line !l l&&!r l&&r condition
61 2 0 0 $ENV{'REDIS_SERVER'} and not defined $args{'sock'}
2 0 0 $ENV{'REDIS_SERVER'} and not defined $args{'sock'} and not defined $args{'server'}
0 0 0 $ENV{'REDIS_SERVER'} and not defined $args{'sock'} and not defined $args{'server'} and not defined $args{'sentinels'}
74 20 2 0 defined $args{$_} and $self->{$_} = $args{$_}
222 0 2 0 @_ && ref $_[-1] eq 'CODE'
228 2 0 0 $cb && $uc_command eq 'EXEC'
270 0 0 0 scalar @{[] unless $self->{'queue'};} and $self->{'conservative_reconnect'}
291 2 0 0 $cb && $custom_decode
300 1 0 0 wantarray && ref $ret eq 'ARRAY'
332 0 0 0 @_ and ref $_[-1] eq 'CODE'
349 0 0 0 @_ and ref $_[-1] eq 'CODE'
365 0 0 0 @_ and ref $_[-1] eq 'CODE'
390 0 0 0 @_ && ref $_[-1] eq 'CODE'
412 0 0 0 defined $reply and not ref $reply
414 0 0 0 ref $reply && ($synchronous_scalar || wantarray)
417 0 0 0 @_ && ref $_[-1] eq 'CODE'
476 0 0 0 defined $e and $e ne 'EOF from server'
700 0 2 0 $self->{'sock'} and ($self->{'pid'} || 0) != $$
818 1 1 0 not defined $bytes and $! == 4
819 1 0 1 defined $bytes and $bytes
838 0 0 0 not defined $bytes and $! == 4
882 0 2 0 $err and $err == 4
885 0 2 0 $err and $err == 11 || $err == 11
889 0 0 0 $err and $err == 104

or 2 conditions

line l !l condition
34 15 0 eval { do { 11 } } || -1000000000
35 15 0 eval { do { 11 } } || -1000000000
36 15 0 eval { do { 4 } } || -1000000000
37 15 0 eval { do { 104 } } || -1000000000
79 0 2 $args{'reconnect'} || 0
80 0 2 $args{'conservative_reconnect'} || 0
81 0 2 $args{'every'} || 1000
120 0 0 $status ||= q[Sentinels don't know this service]
155 0 0 $status || 'failed to connect to any of the sentinels'
291 0 2 $cb || sub { my($reply, $error) = @_; croak("[$command] $error, ") if defined $error; $ret = $reply; }
700 2 0 $self->{'pid'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
44 2 0 0 defined $self->{'read_timeout'} or defined $self->{'write_timeout'}
58 0 0 2 $args{'debug'} || $ENV{'REDIS_DEBUG'}
188 0 0 0 not defined $self->{'current_database'} or $self->{'current_database'} ne $database
230 0 0 2 $uc_command eq 'EXEC' or $uc_command eq 'DISCARD'
267 0 0 0 $self->{'__inside_transaction'} or $self->{'__inside_watch'}
386 0 0 0 not defined $reply or ref $reply
466 0 0 0 $self->{'__buf'} or $self->__try_read_sock($sock)
623 2 0 0 $self->{'builder'}->($self) || croak("Could not connect to Redis server at $self->{'server'}: $!")
705 2 0 0 $self->{'sock'} || $self->__throw_reconnect('Not connected to any server')
756 1 0 0 $type eq '+' or $type eq ':'
885 2 0 0 $err == 11 || $err == 11