Condition Coverage

blib/lib/Redis.pm
Criterion Covered Total %
condition 33 138 23.9


and 3 conditions

line !l l&&!r l&&r condition
68 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'}
81 20 2 0 defined $args{$_} and $self->{$_} = $args{$_}
161 0 0 0 exists $args{'ssl'} and $args{'ssl'}
187 0 0 2 exists $args{'ssl'} and $args{'ssl'}
258 0 2 0 @_ && ref $_[-1] eq 'CODE'
264 2 0 0 $cb && $uc_command eq 'EXEC'
306 0 0 0 scalar @{[] unless $self->{'queue'};} and $self->{'conservative_reconnect'}
327 2 0 0 $cb && $custom_decode
336 1 0 0 wantarray && ref $ret eq 'ARRAY'
368 0 0 0 @_ and ref $_[-1] eq "CODE"
385 0 0 0 @_ and ref $_[-1] eq "CODE"
401 0 0 0 @_ and ref $_[-1] eq "CODE"
426 0 0 0 @_ && ref $_[-1] eq 'CODE'
448 0 0 0 defined $reply and not ref $reply
450 0 0 0 ref $reply && ($synchronous_scalar || wantarray)
453 0 0 0 @_ && ref $_[-1] eq 'CODE'
526 0 0 0 defined $e and $e ne "EOF from server"
750 0 2 0 $self->{'sock'} and ($self->{'pid'} || 0) != $$
869 1 1 0 not defined $bytes and $! == 4
870 1 0 1 defined $bytes and $bytes
889 0 0 0 not defined $bytes and $! == 4
943 0 2 0 $err and $err == 4
946 0 2 0 $err and $err == 11 || $err == 11
950 0 0 0 $err and $err == 104

or 2 conditions

line l !l condition
36 15 0 eval { do { 11 } } || -1000000000
37 15 0 eval { do { 11 } } || -1000000000
38 15 0 eval { do { 4 } } || -1000000000
39 15 0 eval { do { 104 } } || -1000000000
86 0 2 $args{'reconnect'} || 0
87 0 2 $args{'conservative_reconnect'} || 0
88 0 2 $args{'every'} || 1000
127 0 0 $status ||= "Sentinels don't know this service"
173 0 0 $status || 'failed to connect to any of the sentinels'
194 2 0 $args{'SSL_verify_mode'} // 1
327 0 2 $cb || sub { my($reply, $error) = @_; croak("[$command] $error, ") if defined $error; $ret = $reply; }
750 2 0 $self->{'pid'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
51 2 0 0 defined $self->{'read_timeout'} or defined $self->{'write_timeout'}
65 0 0 2 $args{'debug'} || $ENV{'REDIS_DEBUG'}
224 0 0 0 not defined $self->{'current_database'} or $self->{'current_database'} ne $database
266 0 0 2 $uc_command eq "EXEC" or $uc_command eq "DISCARD"
303 0 0 0 $self->{'__inside_transaction'} or $self->{'__inside_watch'}
422 0 0 0 not defined $reply or ref $reply
500 0 0 0 $self->{'__buf'} || $self->__try_read_sock($sock)
506 0 0 0 $self->{'__buf'} || $sock->pending
673 2 0 0 $self->{'builder'}->($self) || croak("Could not connect to Redis server at $self->{'server'}: $!")
755 2 0 0 $self->{'sock'} || $self->__throw_reconnect('Not connected to any server')
807 1 0 0 $type eq "+" or $type eq ":"
946 2 0 0 $err == 11 || $err == 11