line |
true |
false |
branch |
1621
|
0 |
0 |
unless my $class = &_CLASSISA(shift(), 'Redis::CappedCollection') |
1629
|
0 |
0 |
if (&_INSTANCE($redis, 'Redis')) { } |
|
0 |
0 |
elsif (&_INSTANCE($redis, 'Test::RedisServer')) { } |
|
0 |
0 |
elsif (&_INSTANCE($redis, 'Redis::CappedCollection')) { } |
1637
|
0 |
0 |
unless exists $conf->{'server'} |
1639
|
0 |
0 |
$conf->{'requirepass'} ? : |
1663
|
0 |
0 |
if exists $self->_redis->{'no_auto_connect_on_new'} and $self->_redis->{'no_auto_connect_on_new'} and not $self->_redis->{'sock'} |
1665
|
0 |
0 |
if ($self->_create_from_naked_new) { } |
1668
|
0 |
0 |
if not $self->_create_from_open and $self->collection_exists('name', $self->name) |
1673
|
0 |
0 |
if ($self->_check_maxmemory) { } |
1675
|
0 |
0 |
unless defined &_NONNEGINT($maxmemory) |
1683
|
0 |
0 |
if ($major < 2 or $major == 2 and $minor < 8) |
1688
|
0 |
0 |
unless $self->_maxmemory_policy_ok |
1692
|
0 |
0 |
if $self->_maxmemory |
1700
|
0 |
0 |
unless $self->_create_from_open |
1769
|
0 |
0 |
unless my $class = &_CLASSISA(shift(), 'Redis::CappedCollection') |
1774
|
0 |
0 |
unless exists $params{'redis'} |
1775
|
0 |
0 |
unless exists $params{'name'} |
1780
|
0 |
0 |
if (collection_exists('redis', $redis, 'name', $name)) { } |
1782
|
0 |
0 |
unless $info->{'data_version'} == $DATA_VERSION |
1789
|
0 |
0 |
unless ($use_external_connection) |
1864
|
0 |
0 |
if scalar @_ == 2 and not defined $timeout || defined $old_timeout |
1866
|
0 |
0 |
if (my $redis = $self->_redis) |
1867
|
0 |
0 |
unless my $socket = &_INSTANCE($redis->{'sock'}, 'IO::Socket') |
1894
|
0 |
0 |
if scalar @_ == 2 and not defined $timeout || defined $old_timeout |
1896
|
0 |
0 |
if (my $redis = $self->_redis) |
1897
|
0 |
0 |
unless my $socket = &_INSTANCE($redis->{'sock'}, 'IO::Socket') |
1901
|
0 |
0 |
if (defined $timeout) { } |
2122
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
2124
|
0 |
0 |
if $list_id =~ /:/ |
2125
|
0 |
0 |
unless defined &_STRING($data_id) |
2126
|
0 |
0 |
unless defined &_NUMBER($data_time) and $data_time > 0 |
2129
|
0 |
0 |
unless $data_len <= $self->max_datasize |
2148
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($_last_cleanup_items)) { } |
2149
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
|
0 |
0 |
elsif ($error == $E_COLLECTION_DELETED) { } |
|
0 |
0 |
elsif ($error == $E_DATA_ID_EXISTS or $error == $E_OLDER_THAN_ALLOWED) { } |
2165
|
0 |
0 |
wantarray ? : |
2223
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
2225
|
0 |
0 |
unless defined &_STRING($data_id) |
2228
|
0 |
0 |
if (@_) |
2230
|
0 |
0 |
unless defined &_NUMBER($new_data_time) and $new_data_time > 0 |
2234
|
0 |
0 |
unless $data_len <= $self->max_datasize |
2253
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($_last_cleanup_items)) { } |
2254
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
|
0 |
0 |
elsif ($error == $E_NONEXISTENT_DATA_ID) { } |
|
0 |
0 |
elsif ($error == $E_COLLECTION_DELETED or $error == $E_DATA_ID_EXISTS or $error == $E_OLDER_THAN_ALLOWED) { } |
2255
|
0 |
0 |
wantarray ? : |
2300
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
2302
|
0 |
0 |
if $list_id =~ /:/ |
2303
|
0 |
0 |
unless defined &_STRING($data_id) |
2304
|
0 |
0 |
unless not defined $data_time or defined &_NUMBER($data_time) and $data_time > 0 |
2307
|
0 |
0 |
unless $data_len <= $self->max_datasize |
2327
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($cleanings)) { } |
2328
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
|
0 |
0 |
elsif ($error == $E_COLLECTION_DELETED) { } |
|
0 |
0 |
elsif ($error == $E_DATA_ID_EXISTS or $error == $E_OLDER_THAN_ALLOWED) { } |
|
0 |
0 |
elsif ($error == $E_NONEXISTENT_DATA_ID) { } |
2346
|
0 |
0 |
wantarray ? : |
2401
|
0 |
0 |
unless $self->list_exists($list_id) |
2403
|
0 |
0 |
if (defined $data_id and $data_id ne '') { } |
2415
|
0 |
0 |
if (wantarray) { } |
2416
|
0 |
0 |
defined $data_id ? : |
2475
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2476
|
0 |
0 |
if $error != $E_NO_ERROR |
2481
|
0 |
0 |
if ($queue_exist) { } |
2629
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2647
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2648
|
0 |
0 |
if $error != $E_NO_ERROR |
2653
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2658
|
0 |
0 |
unless defined $arguments{'redis'} |
2659
|
0 |
0 |
unless defined $arguments{'name'} |
2664
|
0 |
0 |
if %arguments |
2677
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2678
|
0 |
0 |
if ($error != $E_NO_ERROR) |
2687
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2741
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2742
|
0 |
0 |
if $error != $E_NO_ERROR |
2748
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2784
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2785
|
0 |
0 |
if $error != $E_NO_ERROR |
2791
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2849
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2854
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2860
|
0 |
0 |
unless ($self) |
2861
|
0 |
0 |
unless defined $arguments{'redis'} |
2862
|
0 |
0 |
unless defined $arguments{'name'} |
2865
|
0 |
0 |
unless $self |
2866
|
0 |
0 |
if exists $arguments{'name'} |
2868
|
0 |
0 |
if ($self) { } |
2930
|
0 |
0 |
unless $self->last_errorcode == $E_REDIS_DID_NOT_RETURN_DATA |
2967
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2972
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2978
|
0 |
0 |
unless ($self) |
2979
|
0 |
0 |
unless defined $arguments{'redis'} |
2980
|
0 |
0 |
unless defined $arguments{'name'} |
2983
|
0 |
0 |
unless $self |
2984
|
0 |
0 |
if $arguments{'name'} |
2988
|
0 |
0 |
if exists $arguments{$parameter} |
2990
|
0 |
0 |
unless ($requested_changes) |
2992
|
0 |
0 |
if ($self) { } |
3001
|
0 |
0 |
if (exists $arguments{$parameter}) |
3002
|
0 |
0 |
if ($parameter eq 'cleanup_bytes' or $parameter eq 'cleanup_items') { } |
|
0 |
0 |
elsif ($parameter eq 'memory_reserve') { } |
|
0 |
0 |
elsif ($parameter eq 'older_allowed') { } |
|
0 |
0 |
elsif ($parameter eq 'max_list_items') { } |
3004
|
0 |
0 |
unless defined &_NONNEGINT($arguments{$parameter}) |
3007
|
0 |
0 |
unless &_NUMBER($memory_reserve) and $memory_reserve >= $MIN_MEMORY_RESERVE and $memory_reserve <= $MAX_MEMORY_RESERVE |
3010
|
0 |
0 |
$arguments{$parameter} ? : |
3013
|
0 |
0 |
unless defined &_NONNEGINT($arguments{$parameter}) |
3018
|
0 |
0 |
if ($self) { } |
3024
|
0 |
0 |
if ($ret == 0) { } |
3025
|
0 |
0 |
if ($self) |
3026
|
0 |
0 |
if ($parameter eq 'cleanup_bytes') { } |
|
0 |
0 |
elsif ($parameter eq 'cleanup_items') { } |
|
0 |
0 |
elsif ($parameter eq 'memory_reserve') { } |
|
0 |
0 |
elsif ($parameter eq 'max_list_items') { } |
3041
|
0 |
0 |
if ($self) { } |
3087
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3104
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
3109
|
0 |
0 |
unless defined $arguments{'redis'} |
3110
|
0 |
0 |
unless defined $arguments{'name'} |
3163
|
0 |
0 |
if (exists $ERROR{$error}) { } |
3164
|
0 |
0 |
if $error != $E_NO_ERROR |
3233
|
0 |
0 |
($ret // '') eq 'PONG' ? : |
3251
|
0 |
0 |
if $] >= 5.14 and ${^GLOBAL_PHASE} eq 'DESTRUCT' |
3254
|
0 |
0 |
unless $self->_use_external_connection |
3339
|
0 |
0 |
unless exists $legal_arguments{$argument} |
3342
|
0 |
0 |
if @unlegal_arguments |
3349
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3353
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
3360
|
0 |
0 |
if ($self) { } |
3364
|
0 |
0 |
unless defined $redis_argument |
3374
|
0 |
0 |
unless &_ARRAY($keys) and &_ARRAY0($vals) and scalar @$keys >= scalar @$vals |
3389
|
0 |
0 |
$self->reconnect_on_error ? : |
3405
|
0 |
0 |
if ($DEBUG == 1 or $DEBUG == 3) { } |
3432
|
0 |
0 |
unless &_INSTANCE($redis, 'Redis') |
3438
|
0 |
0 |
if exists $redis->{'no_auto_connect_on_new'} and $redis->{'no_auto_connect_on_new'} and not $redis->{'sock'} |
3451
|
0 |
0 |
$return_as_insert ? : |
3462
|
0 |
0 |
if ($return_as_insert) { } |
3463
|
0 |
0 |
if (scalar @ret == 1 and exists $ERROR{$error}) { } |
3464
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
|
0 |
0 |
elsif ($error == $E_COLLECTION_DELETED) { } |
|
0 |
0 |
elsif ($error == $E_DATA_ID_EXISTS or $error == $E_OLDER_THAN_ALLOWED) { } |
3480
|
0 |
0 |
if (scalar @ret == 3 and exists $ERROR{$error} and $ret[2] eq '_long_term_operation') { } |
3481
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
3511
|
0 |
0 |
$self->older_allowed ? : |
3523
|
0 |
0 |
if ($status_exist) |
3524
|
0 |
0 |
unless $self->cleanup_bytes |
3525
|
0 |
0 |
unless $self->cleanup_items |
3526
|
0 |
0 |
unless $max_list_items == $self->max_list_items |
3527
|
0 |
0 |
unless $older_allowed == $self->older_allowed |
3528
|
0 |
0 |
unless $cleanup_bytes == $self->cleanup_bytes |
3529
|
0 |
0 |
unless $cleanup_items == $self->cleanup_items |
3530
|
0 |
0 |
unless $memory_reserve == $self->memory_reserve |
3531
|
0 |
0 |
unless $data_version == $DATA_VERSION |
3543
|
0 |
0 |
if (not $err or $err != $E_MISMATCH_ARG and $err != $E_DATA_TOO_LARGE and $err != $E_MAXMEMORY_LIMIT and $err != $E_MAXMEMORY_POLICY) |
3560
|
0 |
0 |
if ($err_msg) |
3561
|
0 |
0 |
$msg ? : |
|
0 |
0 |
defined $msg ? : |
3572
|
0 |
0 |
if (exists $ERROR{$err}) { } |
3574
|
0 |
0 |
$prefix ? : |
3577
|
0 |
0 |
$prefix ? : |
3590
|
0 |
0 |
if (&_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3599
|
0 |
0 |
unless ($sha1) |
3600
|
0 |
0 |
unless ($script_prepared{$_running_script_name}) |
3602
|
0 |
0 |
if ($DEBUG) { } |
3625
|
0 |
0 |
if ($self) { } |
3630
|
0 |
0 |
unless $ret |
3638
|
0 |
0 |
if &_INSTANCE($_[0], 'Redis::CappedCollection') |
3642
|
0 |
0 |
if ($self) { } |
3644
|
0 |
0 |
if ($error =~ /Could not connect to Redis server at / or $error =~ /^Can't close socket: / or $error =~ /^Not connected to any server/ or $error =~ /^Error while reading from Redis server: / or $error =~ /^Redis server closed connection/) { } |
|
0 |
0 |
elsif ($error =~ /^\[[^]]+\]\s+NOSCRIPT No matching script. Please use EVAL./) { } |
|
0 |
0 |
elsif ($error =~ /^\[[^]]+\]\s+-?\Q$REDIS_MEMORY_ERROR_MSG\E/i or $error =~ /^\[[^]]+\]\s+-?\Q$REDIS_ERROR_CODE $ERROR{$E_MAXMEMORY_LIMIT}\E/i) { } |
|
0 |
0 |
elsif ($error =~ /^\[[^]]+\]\s+BUSY Redis is busy running a script/) { } |
3655
|
0 |
0 |
if $self->reconnect_on_error |
3678
|
0 |
0 |
if $self->reconnect_on_error |
3684
|
0 |
0 |
if ($error =~ /\] ERR Error (?:running|compiling) script/) |
3696
|
0 |
0 |
if $redis |
3703
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3707
|
0 |
0 |
if (&_HASH0($redis_parameters)) { } |
3720
|
0 |
0 |
unless $redis_parameters = &_HASH0(shift()) |
3735
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) |
3741
|
0 |
0 |
unless exists $conf->{'reconnect'} |
3742
|
0 |
0 |
unless exists $conf->{'every'} |
3743
|
0 |
0 |
unless exists $conf->{'conservative_reconnect'} |
3746
|
0 |
0 |
unless $conf->{'cnx_timeout'} |
3748
|
0 |
0 |
unless $conf->{'read_timeout'} |
3751
|
0 |
0 |
if ($self) |
3763
|
0 |
0 |
if defined $parameters_hash{'password'} |
3775
|
0 |
0 |
if (&_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3783
|
0 |
0 |
if $self |
3785
|
0 |
0 |
if $self and $method =~ /^EVAL/i |
3792
|
0 |
0 |
ref $_ ? : |
3795
|
0 |
0 |
if ($self) { } |
3802
|
0 |
0 |
if ($try_again and $method eq 'EVALSHA') |
3810
|
0 |
0 |
unless (scalar @return) |
3811
|
0 |
0 |
if $self |
3816
|
0 |
0 |
wantarray ? : |
3820
|
0 |
0 |
unless $WAIT_USED_MEMORY |
3825
|
0 |
0 |
if (my $maxmemory = $self->_maxmemory) |
3833
|
0 |
0 |
if ($used_memory < $maxmemory or $sleepped > $max_timeout) |
3834
|
0 |
0 |
if ($DEBUG and $sleepped) |