line |
true |
false |
branch |
1505
|
0 |
0 |
unless my $class = &_CLASSISA(shift(), 'Redis::CappedCollection') |
1513
|
0 |
0 |
if (&_INSTANCE($redis, 'Redis')) { } |
|
0 |
0 |
elsif (&_INSTANCE($redis, 'Test::RedisServer')) { } |
|
0 |
0 |
elsif (&_INSTANCE($redis, 'Redis::CappedCollection')) { } |
1521
|
0 |
0 |
unless exists $conf->{'server'} |
1531
|
0 |
0 |
unless exists $redis->{'reconnect'} |
1532
|
0 |
0 |
unless exists $redis->{'every'} |
1533
|
0 |
0 |
unless exists $redis->{'conservative_reconnect'} |
1534
|
0 |
0 |
unless exists $redis->{'cnx_timeout'} |
1535
|
0 |
0 |
unless exists $redis->{'read_timeout'} |
1536
|
0 |
0 |
unless exists $redis->{'write_timeout'} |
1545
|
0 |
0 |
if ($self->_create_from_naked_new) { } |
1548
|
0 |
0 |
if not $self->_create_from_open and $self->collection_exists('name', $self->name) |
1553
|
0 |
0 |
if ($self->_check_maxmemory) { } |
1555
|
0 |
0 |
unless defined &_NONNEGINT($maxmemory) |
1563
|
0 |
0 |
if ($major < 2 or $major == 2 and $minor < 8) |
1568
|
0 |
0 |
unless $self->_maxmemory_policy_ok |
1572
|
0 |
0 |
if $self->_maxmemory |
1580
|
0 |
0 |
unless $self->_create_from_open |
1646
|
0 |
0 |
unless my $class = &_CLASSISA(shift(), 'Redis::CappedCollection') |
1651
|
0 |
0 |
unless exists $params{'redis'} |
1652
|
0 |
0 |
unless exists $params{'name'} |
1657
|
0 |
0 |
if (collection_exists('redis', $redis, 'name', $name)) { } |
1659
|
0 |
0 |
unless $info->{'data_version'} == $DATA_VERSION |
1734
|
0 |
0 |
if scalar @_ == 2 and not defined $timeout || defined $old_timeout |
1736
|
0 |
0 |
if (my $redis = $self->_redis) |
1737
|
0 |
0 |
unless my $socket = &_INSTANCE($redis->{'sock'}, 'IO::Socket') |
1762
|
0 |
0 |
if scalar @_ == 2 and not defined $timeout || defined $old_timeout |
1764
|
0 |
0 |
if (my $redis = $self->_redis) |
1765
|
0 |
0 |
unless my $socket = &_INSTANCE($redis->{'sock'}, 'IO::Socket') |
1769
|
0 |
0 |
if (defined $timeout) { } |
1971
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
1973
|
0 |
0 |
if $list_id =~ /:/ |
1974
|
0 |
0 |
unless defined &_STRING($data_id) |
1975
|
0 |
0 |
unless defined &_NUMBER($data_time) and $data_time > 0 |
1978
|
0 |
0 |
unless $data_len <= $self->max_datasize |
1996
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($_last_cleanup_items)) { } |
1997
|
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) { } |
2014
|
0 |
0 |
wantarray ? : |
2072
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
2074
|
0 |
0 |
unless defined &_STRING($data_id) |
2077
|
0 |
0 |
if (@_) |
2079
|
0 |
0 |
unless defined &_NUMBER($new_data_time) and $new_data_time > 0 |
2083
|
0 |
0 |
unless $data_len <= $self->max_datasize |
2101
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($_last_cleanup_items)) { } |
2102
|
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) { } |
2103
|
0 |
0 |
wantarray ? : |
2147
|
0 |
0 |
unless defined &_STRING($data) or $data eq '' |
2149
|
0 |
0 |
if $list_id =~ /:/ |
2150
|
0 |
0 |
unless defined &_STRING($data_id) |
2151
|
0 |
0 |
unless not defined $data_time or defined &_NUMBER($data_time) and $data_time > 0 |
2154
|
0 |
0 |
unless $data_len <= $self->max_datasize |
2173
|
0 |
0 |
if (scalar @ret == 4 and exists $ERROR{$error} and defined &_NONNEGINT($cleanings)) { } |
2174
|
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) { } |
2193
|
0 |
0 |
wantarray ? : |
2248
|
0 |
0 |
unless $self->list_exists($list_id) |
2250
|
0 |
0 |
if (defined $data_id and $data_id ne '') { } |
2261
|
0 |
0 |
if (wantarray) { } |
2262
|
0 |
0 |
defined $data_id ? : |
2316
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2317
|
0 |
0 |
if $error == $E_COLLECTION_DELETED |
2318
|
0 |
0 |
if $error != $E_NO_ERROR |
2323
|
0 |
0 |
if ($queue_exist) { } |
2466
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2483
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2484
|
0 |
0 |
if $error == $E_COLLECTION_DELETED |
2485
|
0 |
0 |
if $error != $E_NO_ERROR |
2490
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2495
|
0 |
0 |
unless defined $arguments{'redis'} |
2496
|
0 |
0 |
unless defined $arguments{'name'} |
2501
|
0 |
0 |
if %arguments |
2513
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2514
|
0 |
0 |
if $error != $E_NO_ERROR |
2522
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2575
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2576
|
0 |
0 |
if $error == $E_COLLECTION_DELETED |
2577
|
0 |
0 |
if $error != $E_NO_ERROR |
2583
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2618
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2619
|
0 |
0 |
if $error == $E_COLLECTION_DELETED |
2620
|
0 |
0 |
if $error != $E_NO_ERROR |
2626
|
0 |
0 |
unless not $oldest_time or defined &_NUMBER($oldest_time) |
2684
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2689
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2695
|
0 |
0 |
unless ($self) |
2696
|
0 |
0 |
unless defined $arguments{'redis'} |
2697
|
0 |
0 |
unless defined $arguments{'name'} |
2700
|
0 |
0 |
unless $self |
2701
|
0 |
0 |
if exists $arguments{'name'} |
2703
|
0 |
0 |
if ($self) { } |
2765
|
0 |
0 |
unless $self->last_errorcode == $E_REDIS_DID_NOT_RETURN_DATA |
2802
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2807
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2813
|
0 |
0 |
unless ($self) |
2814
|
0 |
0 |
unless defined $arguments{'redis'} |
2815
|
0 |
0 |
unless defined $arguments{'name'} |
2818
|
0 |
0 |
unless $self |
2819
|
0 |
0 |
if $arguments{'name'} |
2823
|
0 |
0 |
if exists $arguments{$parameter} |
2825
|
0 |
0 |
unless ($requested_changes) |
2827
|
0 |
0 |
if ($self) { } |
2836
|
0 |
0 |
if (exists $arguments{$parameter}) |
2837
|
0 |
0 |
if ($parameter eq 'min_cleanup_bytes' or $parameter eq 'min_cleanup_items') { } |
|
0 |
0 |
elsif ($parameter eq 'memory_reserve') { } |
|
0 |
0 |
elsif ($parameter eq 'older_allowed') { } |
2839
|
0 |
0 |
unless &_NONNEGINT($arguments{$parameter}) |
2842
|
0 |
0 |
unless &_NUMBER($memory_reserve) and $memory_reserve >= $MIN_MEMORY_RESERVE and $memory_reserve <= $MAX_MEMORY_RESERVE |
2845
|
0 |
0 |
$arguments{$parameter} ? : |
2850
|
0 |
0 |
if ($self) { } |
2856
|
0 |
0 |
if ($ret == 0) { } |
2857
|
0 |
0 |
if ($self) |
2858
|
0 |
0 |
if ($parameter eq 'min_cleanup_bytes') { } |
|
0 |
0 |
elsif ($parameter eq 'min_cleanup_items') { } |
|
0 |
0 |
elsif ($parameter eq 'memory_reserve') { } |
2871
|
0 |
0 |
if ($self) { } |
2917
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
2934
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
2939
|
0 |
0 |
unless defined $arguments{'redis'} |
2940
|
0 |
0 |
unless defined $arguments{'name'} |
2991
|
0 |
0 |
if (exists $ERROR{$error}) { } |
2992
|
0 |
0 |
if $error == $E_COLLECTION_DELETED |
2993
|
0 |
0 |
if $error != $E_NO_ERROR |
3066
|
0 |
0 |
($ret // '') eq 'PONG' ? : |
3084
|
0 |
0 |
if $] >= 5.14 and ${^GLOBAL_PHASE} eq 'DESTRUCT' |
3088
|
0 |
0 |
unless ($self->_use_external_connection) |
3179
|
0 |
0 |
unless exists $legal_arguments{$argument} |
3182
|
0 |
0 |
if @unlegal_arguments |
3189
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3193
|
0 |
0 |
if &_CLASSISA($_[0], 'Redis::CappedCollection') |
3200
|
0 |
0 |
if ($self) { } |
3204
|
0 |
0 |
unless defined $redis_argument |
3214
|
0 |
0 |
unless &_ARRAY($keys) and &_ARRAY0($vals) and scalar @$keys >= scalar @$vals |
3229
|
0 |
0 |
$self->reconnect_on_error ? : |
3262
|
0 |
0 |
unless &_INSTANCE($redis, 'Redis') |
3276
|
0 |
0 |
$return_as_insert ? : |
3285
|
0 |
0 |
if ($return_as_insert) { } |
3286
|
0 |
0 |
if (scalar @ret == 1 and exists $ERROR{$error}) { } |
3287
|
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) { } |
3304
|
0 |
0 |
if (scalar @ret == 3 and exists $ERROR{$error} and $ret[2] eq '_long_term_operation') { } |
3305
|
0 |
0 |
if ($error == $E_NO_ERROR) { } |
3335
|
0 |
0 |
$self->older_allowed ? : |
3345
|
0 |
0 |
if ($status_exist) |
3346
|
0 |
0 |
unless $self->min_cleanup_bytes |
3347
|
0 |
0 |
unless $self->min_cleanup_items |
3348
|
0 |
0 |
unless $older_allowed == $self->older_allowed |
3349
|
0 |
0 |
unless $min_cleanup_bytes == $self->min_cleanup_bytes |
3350
|
0 |
0 |
unless $min_cleanup_items == $self->min_cleanup_items |
3351
|
0 |
0 |
unless $memory_reserve == $self->memory_reserve |
3352
|
0 |
0 |
unless $data_version == $DATA_VERSION |
3362
|
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) |
3378
|
0 |
0 |
if ($err_msg) |
3379
|
0 |
0 |
$msg ? : |
|
0 |
0 |
defined $msg ? : |
3390
|
0 |
0 |
if $self->reconnect_on_error |
3392
|
0 |
0 |
if (exists $ERROR{$err}) { } |
3394
|
0 |
0 |
$prefix ? : |
3397
|
0 |
0 |
$prefix ? : |
3406
|
0 |
0 |
if (&_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3417
|
0 |
0 |
unless ($sha1) |
3420
|
0 |
0 |
if ($self) { } |
3425
|
0 |
0 |
unless $ret |
3433
|
0 |
0 |
if &_INSTANCE($_[0], 'Redis::CappedCollection') |
3437
|
0 |
0 |
if ($self) { } |
3439
|
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+-?\Q$REDIS_MEMORY_ERROR_MSG\E/i or $error =~ /^\[[^]]+\]\s+-?\Q$REDIS_ERROR_CODE $ERROR{$E_MAXMEMORY_LIMIT}\E/i or $error =~ /^\[[^]]+\]\s+-NOSCRIPT No matching script. Please use EVAL./) { } |
|
0 |
0 |
elsif ($error =~ /^\[[^]]+\]\s+BUSY Redis is busy running a script/) { } |
3450
|
0 |
0 |
if $self->reconnect_on_error |
3468
|
0 |
0 |
if $self->reconnect_on_error |
3474
|
0 |
0 |
if ($error =~ /\] ERR Error (?:running|compiling) script/) |
3484
|
0 |
0 |
if $self->_redis |
3489
|
0 |
0 |
if (@_ and &_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3493
|
0 |
0 |
if (&_HASH0($redis_parameters)) { } |
3505
|
0 |
0 |
unless $redis_parameters = &_HASH0(shift()) |
3521
|
0 |
0 |
if defined $parameters_hash{'password'} |
3533
|
0 |
0 |
if (&_INSTANCE($_[0], 'Redis::CappedCollection')) { } |
3536
|
0 |
0 |
if ($self->reconnect_on_error and not $self->ping) |
3538
|
0 |
0 |
if $err_msg |
3547
|
0 |
0 |
if $self |
3552
|
0 |
0 |
ref $_ ? : |
3555
|
0 |
0 |
if ($self) { } |
3562
|
0 |
0 |
unless (scalar @return) |
3563
|
0 |
0 |
if $self |
3568
|
0 |
0 |
wantarray ? : |