Branch Coverage

blib/lib/Redis/Fast.pm
Criterion Covered Total %
branch 20 112 17.8


line true false branch
23 0 0 if $host =~ /:/ or $host =~ /%/
28 0 4 if ($hostport =~ /\A\[([^\]]+)\]:([0-9]+)\z/)
40 68 0 unless ($self->is_subscriber)
44 0 0 if ref $n eq "CODE"
45 0 0 if defined $n
46 0 68 if defined $name
49 0 68 if defined $data->{'current_database'}
56 0 0 if ($topic =~ /(p?message):(.*)$/)
59 0 0 if ($key eq 'message') { }
67 0 68 if defined $on_conn
73 0 68 if (defined $password)
81 0 0 if (defined $err)
82 0 0 if ($err =~ /ERR invalid password|WRONGPASS invalid username-password pair/) { }
110 0 70 if ($reconnect_on_error) { }
115 0 0 if ($next_reconnect_interval < -1)
126 0 0 if (-1 < $next_reconnect_interval)
142 0 0 if ($ENV{'REDIS_SERVER'} and not $args{'sock'} and not $args{'server'})
143 0 0 if ($ENV{'REDIS_SERVER'} =~ m[^/]) { }
0 0 elsif ($ENV{'REDIS_SERVER'} =~ /^unix:(.+)/) { }
0 0 elsif ($ENV{'REDIS_SERVER'} =~ /^(tcp:)?(.+)/) { }
166 66 4 if ($args{'sock'}) { }
0 4 elsif ($args{'sentinels'}) { }
170 0 0 unless ref $sentinels eq "ARRAY"
173 0 0 unless defined($self->__get_data->{'service'} = $args{'service'})
182 0 0 unless my $sentinel = eval { do { "Redis::Fast::Sentinel"->new("server", $sentinel_address, "cnx_timeout", exists $data->{'sentinels_cnx_timeout'} ? $data->{'sentinels_cnx_timeout'} : "0.1", "read_timeout", exists $data->{'sentinels_read_timeout'} ? $data->{'sentinels_read_timeout'} : 1, "write_timeout", exists $data->{'sentinels_write_timeout'} ? $data->{'sentinels_write_timeout'} : 1) } }
190 0 0 exists $data->{'sentinels_cnx_timeout'} ? :
0 0 exists $data->{'sentinels_read_timeout'} ? :
0 0 exists $data->{'sentinels_write_timeout'} ? :
194 0 0 unless defined $server_address
197 0 0 if $server_address eq "IDONTKNOW"
205 0 0 unless ($data->{'no_sentinels_list_update'})
237 0 70 $args{'debug'} || $ENV{'REDIS_DEBUG'} ? :
242 0 70 if (my $cb = $self->_new_reconnect_on_error_cb($args{'reconnect_on_error'}))
246 69 1 unless $args{'no_auto_connect_on_new'}
265 14 54 if defined $error
266 9 45 wantarray && ref $ret eq 'ARRAY' ? :
289 0 0 if defined $error
290 0 0 unless ref $ret eq "ARRAY"
297 0 0 unless $self->__sock
300 0 0 if defined $error
311 3 0 if defined $error
312 0 0 unless ref $ret eq "ARRAY"
333 0 0 if defined $error
346 0 0 unless ref $cb eq "CODE"
356 0 0 if $unsub
359 0 0 if (@subs)
377 0 0 if $cb
382 0 0 if ($cbs) { }
384 0 0 unless (%$cbs)
408 0 0 unless $subs->{$key} and @{$subs->{$key};}
410 0 0 if @$cbs
423 0 0 if ($m->[0] =~ /^p?message$/)
432 0 0 unless $unsub
442 0 0 defined $m->[2] ? :
444 0 0 unless (exists $subs->{$cbid})
458 0 71 if $self->is_subscriber