line |
true |
false |
branch |
145
|
0 |
36 |
ref $_[0] ? : |
147
|
2 |
3 |
if ($self->{'path'} and $self->{'host'} || $self->{'port'}) |
150
|
8 |
26 |
if ($self->{'url'}) |
151
|
2 |
5 |
if ($self->{'host'} or $self->{'port'} or $self->{'path'}) |
159
|
27 |
4 |
unless exists $self->{'raise_error'} |
167
|
18 |
13 |
unless $self->{'lazy'} |
176
|
0 |
5 |
unless ($uri->scheme =~ /^redis/) |
222
|
0 |
45 |
if $self->replies_to_fetch |
224
|
0 |
45 |
if $self->{'_subscription_loop'} |
241
|
11 |
17 |
if ($err) { } |
244
|
7 |
4 |
if ($self->{'raise_error'} or $self->{'_in_multi'} or $self->{'_watching'}) { } |
|
0 |
4 |
elsif (my $loop_type = $self->{'_subscription_loop'}) { } |
281
|
0 |
17 |
if $self->{'warnings'} |
293
|
3 |
53 |
if $self->{'_in_connect'} |
300
|
2 |
56 |
if ($self->{'path'}) { } |
304
|
1 |
1 |
unless $self->{'_socket'} = 'IO::Socket::UNIX'->new('Type', 1, 'Peer', $self->{'path'}) |
310
|
30 |
56 |
if $delay |
315
|
2 |
84 |
$self->{'timeout'} ? : |
|
48 |
38 |
unless $self->{'_socket'} = 'IO::Socket::IP'->new('PeerAddr', $self->{'host'}, 'PeerPort', $self->{'port'}, 'Proto', 'tcp', $self->{'timeout'} ? ('Timeout', $self->{'timeout'}) : ()) |
317
|
30 |
56 |
$delay ? : |
318
|
8 |
78 |
if $delay > $self->{'reconnect_delay_max'} |
324
|
19 |
39 |
unless ($self->{'_socket'}) |
330
|
6 |
8 |
if ($self->{'raise_error'}) { } |
335
|
8 |
0 |
if $self->{'_parser'} |
339
|
8 |
5 |
if $new_error |
343
|
2 |
37 |
if ($self->{'timeout'}) |
350
|
0 |
2 |
if ($RedisDB::Config{'osname'} eq 'netbsd') { } |
|
0 |
2 |
elsif ($RedisDB::Config{'osname'} eq 'openbsd') { } |
352
|
0 |
0 |
if ($1 and $1 >= 6) |
358
|
0 |
0 |
if ($1 and $1 > 5 || $1 == 5 && $2 >= 5) |
362
|
0 |
2 |
if ($timet64 and $RedisDB::Config{'longsize'} == 4) { } |
363
|
0 |
0 |
if (defined $RedisDB::Config{'use64bitint'}) { } |
370
|
0 |
0 |
$RedisDB::Config{'byteorder'} eq '1234' ? : |
381
|
0 |
2 |
unless defined $self->{'_socket'}->sockopt(20, $timeout) |
383
|
0 |
2 |
unless defined $self->{'_socket'}->sockopt(21, $timeout) |
397
|
0 |
39 |
if ($self->{'password'}) |
403
|
0 |
0 |
if _is_redisdb_error($res) |
409
|
0 |
39 |
if ($self->{'connection_name'}) |
414
|
3 |
36 |
if ($self->{'database'}) |
438
|
0 |
47 |
if $SET_NB |
442
|
0 |
17 |
do {
$buf ne ''
} ? : |
|
17 |
30 |
defined $ret ? : |
445
|
30 |
0 |
if $! == 11 or $! == 11 |
446
|
0 |
0 |
if $! == 4 |
462
|
0 |
17 |
if ($self->{'_parser'}->callbacks or $self->{'_in_multi'} or $self->{'_watching'}) { } |
472
|
17 |
0 |
unless ($self->{'_socket'}) |
474
|
4 |
10 |
if $error |
480
|
0 |
40 |
if $SET_NB |
517
|
7 |
47 |
if (ref $_[-1] eq 'CODE') { } |
526
|
0 |
54 |
if ($self->{'_subscription_loop'}) |
527
|
0 |
0 |
unless $command =~ /^(P?(UN)?SUBSCRIBE|QUIT)$/ |
532
|
0 |
54 |
if ($command eq 'AUTH') { } |
|
3 |
51 |
elsif ($command eq 'SELECT') { } |
|
0 |
102 |
elsif ($command eq 'CLIENT' and uc $_[0] eq 'SETNAME') { } |
541
|
0 |
0 |
unless ref $_[1] |
553
|
21 |
33 |
unless ($self->{'_socket'} and $self->{'_pid'} == $$) |
555
|
4 |
14 |
if ($error) |
564
|
4 |
40 |
if ($error) |
573
|
0 |
40 |
unless $NOSIGNAL |
574
|
0 |
40 |
unless defined send($self->{'_socket'}, $request, $NOSIGNAL) |
584
|
0 |
0 |
if (_is_redisdb_error($res)) |
628
|
0 |
0 |
if ref $_[-1] eq 'CODE' |
645
|
0 |
0 |
if ($error) |
648
|
0 |
0 |
@{$self->{'_replies'};} ? : |
662
|
0 |
0 |
unless $self->{'_parser'} |
665
|
0 |
0 |
unless $self->{'_pid'} == $$ |
667
|
0 |
0 |
unless (defined $ret) |
668
|
0 |
0 |
if $! == 4 |
669
|
0 |
0 |
if ($! == 11) { } |
678
|
0 |
0 |
if ($buffer ne '') { } |
710
|
0 |
0 |
unless @{$self->{'_replies'};} or $self->{'_to_be_fetched'} or $self->{'_subscription_loop'} |
711
|
0 |
44 |
unless $self->{'_pid'} == $$ |
714
|
2 |
43 |
if (not defined $ret) { } |
|
34 |
9 |
elsif ($buffer ne '') { } |
715
|
0 |
2 |
if $! == 4 or $! == 0 |
717
|
2 |
0 |
if ($! == 11 or $! == 11) { } |
738
|
0 |
12 |
if (_is_redisdb_error($res) and $self->{'raise_error'} || $self->{'_in_multi'} || $self->{'_watching'}) |
744
|
0 |
37 |
if ($self->{'_subscription_loop'}) |
745
|
0 |
0 |
unless ref $res |
746
|
0 |
0 |
if ($res->[0] eq 'message') { } |
|
0 |
0 |
elsif ($res->[0] eq 'pmessage') { } |
|
0 |
0 |
elsif ($res->[0] =~ /^p?(un)?subscribe/) { } |
748
|
0 |
0 |
if $self->{'_subscribed'}{$res->[1]} |
752
|
0 |
0 |
if $self->{'_psubscribed'}{$res->[1]} |
835
|
0 |
0 |
unless $info->{'redis_version'} =~ /^([0-9]+)[.]([0-9]+)(?:[.]([0-9]+))?/ |
837
|
0 |
0 |
$3 ? : |
923
|
4 |
45 |
if (ref $_[-1] eq 'CODE') { } |
941
|
0 |
0 |
if ($_[-1] and ref $_[-1] eq 'CODE') { } |
945
|
0 |
0 |
unless _is_redisdb_error($reply) |
952
|
0 |
0 |
unless _is_redisdb_error($reply) |
972
|
0 |
0 |
if not $info or ref $info |
991
|
0 |
0 |
if not $list or ref $list |
995
|
0 |
0 |
/^([^=]+)=(.*)$/ ? : |
1038
|
0 |
0 |
unless ($host) |
1065
|
0 |
0 |
if ($parsed->{'role'} eq 'master') { } |
|
0 |
0 |
elsif ($parsed->{'role'} eq 'slave') { } |
|
0 |
0 |
elsif ($parsed->{'role'} eq 'sentinel') { } |
1135
|
0 |
0 |
if (ref $_[-1] eq 'CODE') |
1144
|
0 |
0 |
unless ref $res eq 'ARRAY' |
1170
|
0 |
0 |
if (ref $_[-1] eq 'CODE') |
1177
|
0 |
0 |
unless ref $res eq 'ARRAY' |
1434
|
0 |
0 |
if $self->{'_subscription_loop'} > 0 |
1435
|
0 |
0 |
if $self->replies_to_fetch |
1443
|
0 |
0 |
if ($args{'subscribe'}) |
1446
|
0 |
0 |
if ref $args{'subscribe'}[0] eq 'CODE' |
1450
|
0 |
0 |
if ($args{'psubscribe'}) |
1453
|
0 |
0 |
if ref $args{'psubscribe'}[0] eq 'CODE' |
1458
|
0 |
0 |
unless CORE::keys %{$$self{'_subscribed'};} or CORE::keys %{$$self{'_psubscribed'};} |
1476
|
0 |
0 |
unless ($self->{'_subscription_loop'}) |
1481
|
0 |
0 |
unless length $channel |
1482
|
0 |
0 |
if ($self->{'_subscription_loop'} > 0) { } |
1484
|
0 |
0 |
unless $callback ||= $self->{'_subscription_cb'} |
1504
|
0 |
0 |
unless ($self->{'_subscription_loop'}) |
1509
|
0 |
0 |
unless length $channel |
1510
|
0 |
0 |
if ($self->{'_subscription_loop'} > 0) { } |
1512
|
0 |
0 |
unless $callback ||= $self->{'_subscription_cb'} |
1532
|
0 |
0 |
if (@_) { } |
1538
|
0 |
0 |
if (%{$self->{'_subscribed'};} or %{{} unless $self->{'_psubscribed'};}) { } |
1539
|
0 |
0 |
unless $self->{'_psubscribed'} |
1560
|
0 |
0 |
if (@_) { } |
1566
|
0 |
0 |
unless $self->{'_subscribed'} |
|
0 |
0 |
if (%{{} unless $self->{'_subscribed'};} or %{$self->{'_psubscribed'};}) { } |
1626
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1644
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1664
|
0 |
0 |
if $self->{'_in_multi'} |
1666
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1687
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1708
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |