line |
true |
false |
branch |
146
|
0 |
36 |
ref $_[0] ? : |
148
|
2 |
3 |
if ($self->{'path'} and $self->{'host'} || $self->{'port'}) |
151
|
8 |
26 |
if ($self->{'url'}) |
152
|
2 |
5 |
if ($self->{'host'} or $self->{'port'} or $self->{'path'}) |
160
|
27 |
4 |
unless exists $self->{'raise_error'} |
168
|
18 |
13 |
unless $self->{'lazy'} |
177
|
0 |
5 |
unless ($uri->scheme =~ /^redis/) |
223
|
0 |
45 |
if $self->replies_to_fetch |
225
|
0 |
45 |
if $self->{'_subscription_loop'} |
242
|
11 |
17 |
if ($err) { } |
245
|
7 |
4 |
if ($self->{'raise_error'} or $self->{'_in_multi'} or $self->{'_watching'}) { } |
|
0 |
4 |
elsif (my $loop_type = $self->{'_subscription_loop'}) { } |
282
|
0 |
17 |
if $self->{'warnings'} |
294
|
3 |
53 |
if $self->{'_in_connect'} |
301
|
2 |
56 |
if ($self->{'path'}) { } |
305
|
1 |
1 |
unless $self->{'_socket'} = 'IO::Socket::UNIX'->new('Type', 1, 'Peer', $self->{'path'}) |
311
|
30 |
56 |
if $delay |
316
|
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'}) : ()) |
318
|
30 |
56 |
$delay ? : |
319
|
5 |
81 |
if $delay > $self->{'reconnect_delay_max'} |
325
|
19 |
39 |
unless ($self->{'_socket'}) |
331
|
6 |
8 |
if ($self->{'raise_error'}) { } |
336
|
8 |
0 |
if $self->{'_parser'} |
340
|
8 |
5 |
if $new_error |
344
|
2 |
37 |
if ($self->{'timeout'}) |
351
|
0 |
2 |
if ($RedisDB::Config{'osname'} eq 'netbsd') { } |
|
0 |
2 |
elsif ($RedisDB::Config{'osname'} eq 'openbsd') { } |
353
|
0 |
0 |
if ($1 and $1 >= 6) |
359
|
0 |
0 |
if ($1 and $1 > 5 || $1 == 5 && $2 >= 5) |
363
|
0 |
2 |
if ($timet64 and $RedisDB::Config{'longsize'} == 4) { } |
364
|
0 |
0 |
if (defined $RedisDB::Config{'use64bitint'}) { } |
371
|
0 |
0 |
$RedisDB::Config{'byteorder'} eq '1234' ? : |
382
|
0 |
2 |
unless defined $self->{'_socket'}->sockopt(20, $timeout) |
384
|
0 |
2 |
unless defined $self->{'_socket'}->sockopt(21, $timeout) |
398
|
0 |
39 |
if ($self->{'password'}) |
404
|
0 |
0 |
if _is_redisdb_error($res) |
410
|
0 |
39 |
if ($self->{'connection_name'}) |
415
|
3 |
36 |
if ($self->{'database'}) |
439
|
0 |
47 |
if $SET_NB |
443
|
0 |
17 |
do {
$buf ne ''
} ? : |
|
17 |
30 |
defined $ret ? : |
446
|
30 |
0 |
if $! == 11 or $! == 11 |
447
|
0 |
0 |
if $! == 4 |
463
|
0 |
17 |
if ($self->{'_parser'}->callbacks or $self->{'_in_multi'} or $self->{'_watching'}) { } |
473
|
17 |
0 |
unless ($self->{'_socket'}) |
475
|
4 |
10 |
if $error |
481
|
0 |
40 |
if $SET_NB |
518
|
7 |
47 |
if (ref $_[-1] eq 'CODE') { } |
527
|
0 |
54 |
if ($self->{'_subscription_loop'}) |
528
|
0 |
0 |
unless $command =~ /^(P?(UN)?SUBSCRIBE|QUIT)$/ |
533
|
0 |
54 |
if ($command eq 'AUTH') { } |
|
3 |
51 |
elsif ($command eq 'SELECT') { } |
|
0 |
102 |
elsif ($command eq 'CLIENT' and uc $_[0] eq 'SETNAME') { } |
542
|
0 |
0 |
unless ref $_[1] |
554
|
21 |
33 |
unless ($self->{'_socket'} and $self->{'_pid'} == $$) |
556
|
4 |
14 |
if ($error) |
565
|
4 |
40 |
if ($error) |
574
|
0 |
40 |
unless $NOSIGNAL |
575
|
0 |
40 |
unless defined send($self->{'_socket'}, $request, $NOSIGNAL) |
585
|
0 |
0 |
if (_is_redisdb_error($res)) |
629
|
0 |
0 |
if ref $_[-1] eq 'CODE' |
646
|
0 |
0 |
if ($error) |
649
|
0 |
0 |
@{$self->{'_replies'};} ? : |
663
|
0 |
0 |
unless $self->{'_parser'} |
666
|
0 |
0 |
unless $self->{'_pid'} == $$ |
668
|
0 |
0 |
unless (defined $ret) |
669
|
0 |
0 |
if $! == 4 |
670
|
0 |
0 |
if ($! == 11) { } |
679
|
0 |
0 |
if ($buffer ne '') { } |
711
|
0 |
0 |
unless @{$self->{'_replies'};} or $self->{'_to_be_fetched'} or $self->{'_subscription_loop'} |
712
|
0 |
44 |
unless $self->{'_pid'} == $$ |
715
|
2 |
43 |
if (not defined $ret) { } |
|
34 |
9 |
elsif ($buffer ne '') { } |
716
|
0 |
2 |
if $! == 4 or $! == 0 |
718
|
2 |
0 |
if ($! == 11 or $! == 11) { } |
739
|
0 |
12 |
if (_is_redisdb_error($res) and $self->{'raise_error'} || $self->{'_in_multi'} || $self->{'_watching'}) |
745
|
0 |
37 |
if ($self->{'_subscription_loop'}) |
746
|
0 |
0 |
unless ref $res |
747
|
0 |
0 |
if ($res->[0] eq 'message') { } |
|
0 |
0 |
elsif ($res->[0] eq 'pmessage') { } |
|
0 |
0 |
elsif ($res->[0] =~ /^p?(un)?subscribe/) { } |
749
|
0 |
0 |
if $self->{'_subscribed'}{$res->[1]} |
753
|
0 |
0 |
if $self->{'_psubscribed'}{$res->[1]} |
836
|
0 |
0 |
unless $info->{'redis_version'} =~ /^([0-9]+)[.]([0-9]+)(?:[.]([0-9]+))?/ |
838
|
0 |
0 |
$3 ? : |
924
|
4 |
45 |
if (ref $_[-1] eq 'CODE') { } |
942
|
0 |
0 |
if ($_[-1] and ref $_[-1] eq 'CODE') { } |
946
|
0 |
0 |
unless _is_redisdb_error($reply) |
953
|
0 |
0 |
unless _is_redisdb_error($reply) |
973
|
0 |
0 |
if not $info or ref $info |
992
|
0 |
0 |
if not $list or ref $list |
996
|
0 |
0 |
/^([^=]+)=(.*)$/ ? : |
1039
|
0 |
0 |
unless ($host) |
1066
|
0 |
0 |
if ($parsed->{'role'} eq 'master') { } |
|
0 |
0 |
elsif ($parsed->{'role'} eq 'slave') { } |
|
0 |
0 |
elsif ($parsed->{'role'} eq 'sentinel') { } |
1136
|
0 |
0 |
if (ref $_[-1] eq 'CODE') |
1145
|
0 |
0 |
unless ref $res eq 'ARRAY' |
1171
|
0 |
0 |
if (ref $_[-1] eq 'CODE') |
1178
|
0 |
0 |
unless ref $res eq 'ARRAY' |
1435
|
0 |
0 |
if $self->{'_subscription_loop'} > 0 |
1436
|
0 |
0 |
if $self->replies_to_fetch |
1444
|
0 |
0 |
if ($args{'subscribe'}) |
1447
|
0 |
0 |
if ref $args{'subscribe'}[0] eq 'CODE' |
1451
|
0 |
0 |
if ($args{'psubscribe'}) |
1454
|
0 |
0 |
if ref $args{'psubscribe'}[0] eq 'CODE' |
1459
|
0 |
0 |
unless CORE::keys %{$$self{'_subscribed'};} or CORE::keys %{$$self{'_psubscribed'};} |
1477
|
0 |
0 |
unless ($self->{'_subscription_loop'}) |
1482
|
0 |
0 |
unless length $channel |
1483
|
0 |
0 |
if ($self->{'_subscription_loop'} > 0) { } |
1485
|
0 |
0 |
unless $callback ||= $self->{'_subscription_cb'} |
1505
|
0 |
0 |
unless ($self->{'_subscription_loop'}) |
1510
|
0 |
0 |
unless length $channel |
1511
|
0 |
0 |
if ($self->{'_subscription_loop'} > 0) { } |
1513
|
0 |
0 |
unless $callback ||= $self->{'_subscription_cb'} |
1533
|
0 |
0 |
if (@_) { } |
1539
|
0 |
0 |
if (%{$self->{'_subscribed'};} or %{{} unless $self->{'_psubscribed'};}) { } |
1540
|
0 |
0 |
unless $self->{'_psubscribed'} |
1561
|
0 |
0 |
if (@_) { } |
1567
|
0 |
0 |
unless $self->{'_subscribed'} |
|
0 |
0 |
if (%{{} unless $self->{'_subscribed'};} or %{$self->{'_psubscribed'};}) { } |
1627
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1645
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1665
|
0 |
0 |
if $self->{'_in_multi'} |
1667
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1688
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |
1709
|
0 |
0 |
if (ref $_[-1] eq 'CODE') { } |