line |
true |
false |
branch |
282
|
0 |
0 |
unless $$ns{'format'} =~ /^[\$\&lLsScCqQ]*(?:\([\$\&lLsScCqQ]+\)\*|\*)?$/ |
283
|
0 |
0 |
if $$ns{'format'} =~ s/\*$// |
286
|
0 |
0 |
if ($$ns{'long_tuple'}) |
291
|
0 |
0 |
/[\&\$]/ ? : |
292
|
0 |
0 |
/[\&\$]/ ? : |
296
|
0 |
0 |
/[\&\$]/ ? : |
297
|
0 |
0 |
/[\&\$]/ ? : |
299
|
0 |
0 |
if $$ns{'long_tuple'} |
318
|
0 |
0 |
if exists $$arg{'raise'} |
324
|
0 |
0 |
if exists $$arg{'hashify'} |
326
|
0 |
0 |
if not defined $$self{'default_raw'} and defined $$self{'hashify'} and not $$self{'hashify'} |
329
|
0 |
0 |
unless @{$$arg{'spaces'};} |
333
|
0 |
0 |
defined $$ns{'space'} ? : |
335
|
0 |
0 |
unless defined $namespace |
336
|
0 |
0 |
if $namespaces{$namespace} or $$ns{'name'} and $namespaces{$$ns{'name'}} |
337
|
0 |
0 |
unless $$ns{'indexes'} and @{$$ns{'indexes'};} |
339
|
0 |
0 |
if $$ns{'name'} |
343
|
0 |
0 |
unless defined $$ns{'append_for_unpack'} |
350
|
0 |
0 |
unless length $$index{'index_name'} |
352
|
0 |
0 |
unless $$index{'keys'} and @{$$index{'keys'};} |
353
|
0 |
0 |
if $$inames{$index_name} or $$inames{$i} |
354
|
0 |
0 |
unless defined $$index{'id'} |
360
|
0 |
0 |
if (@{$$ns{'indexes'};} > 1) { } |
361
|
0 |
0 |
unless defined $$ns{'default_index'} |
362
|
0 |
0 |
unless $$inames{$$ns{'default_index'}} |
363
|
0 |
0 |
unless defined $$ns{'primary_key_index'} |
364
|
0 |
0 |
unless $$inames{$$ns{'primary_key_index'}} |
371
|
0 |
0 |
if ($$ns{'fields'}) |
372
|
0 |
0 |
unless ref $$ns{'fields'} eq 'ARRAY' |
373
|
0 |
0 |
if @{$$ns{'fields'};} != int(not !$$ns{'long_tuple'}) + @{$$ns{'field_format'};} |
377
|
0 |
0 |
if ($$ns{'long_fields'}) |
378
|
0 |
0 |
unless ref $$ns{'long_fields'} eq 'ARRAY' |
379
|
0 |
0 |
if @{$$ns{'long_fields'};} != @{$$ns{'long_field_format'};} |
383
|
0 |
0 |
if not defined $$ns{'default_raw'} and defined $$ns{'hashify'} and not $$ns{'hashify'} |
386
|
0 |
0 |
if (@{$$arg{'spaces'};} > 1) { } |
387
|
0 |
0 |
if defined $$arg{'default_space'} |
388
|
0 |
0 |
unless defined $$arg{'default_namespace'} |
389
|
0 |
0 |
unless $namespaces{$$arg{'default_namespace'}} |
393
|
0 |
0 |
unless $namespaces{$$self{'default_namespace'}} |
401
|
0 |
0 |
if ($_[0]{'warn'}) { } |
450
|
0 |
0 |
if length $data < 4 |
467
|
0 |
0 |
if $callback and $$self{'raise'} |
472
|
0 |
0 |
if ($data) |
474
|
0 |
0 |
if $$ret_code[0] == 0 |
476
|
0 |
0 |
if ($$ret_code[0] == 1 and --$soft_retry > 0) |
477
|
0 |
0 |
if $retry > 1 |
481
|
0 |
0 |
if --$retry |
489
|
0 |
0 |
if (not $error and $data) { } |
493
|
0 |
0 |
$$ret_code[0] == 0 ? : |
494
|
0 |
0 |
if $$ret_code[0] != 0 and $$self{'debug'} >= 1 |
496
|
0 |
0 |
if ($$ret_code[0] == 0) |
498
|
0 |
0 |
if length $$data > 0 |
499
|
0 |
0 |
unless $_cb |
503
|
0 |
0 |
if ($$ret_code[0] == 2) |
504
|
0 |
0 |
if $$self{'raise'} |
505
|
0 |
0 |
unless $_cb |
511
|
0 |
0 |
if $$self{'debug'} >= 1 |
512
|
0 |
0 |
if $$self{'raise'} |
513
|
0 |
0 |
unless $_cb |
518
|
0 |
0 |
if ($callback) |
521
|
0 |
0 |
if eval {
do {
$$self{'server'}->send({%param, 'is_retry', $is_retry, 'max_request_retries', $retry}, $process);
1
}
} |
525
|
0 |
0 |
if $return_fh |
533
|
0 |
0 |
if $param{'continue'} and $$ret{'ok'} |
534
|
0 |
0 |
unless &$is_retry($$ret{'ok'}) |
538
|
0 |
0 |
if $$self{'raise'} and not $$ret{'ok'} |
549
|
0 |
0 |
$args && @$args && ref $$args[-1] eq 'HASH' ? : |
556
|
0 |
0 |
unless exists $pnames{$pname} |
559
|
0 |
0 |
if exists $$param{'space'} and defined $$param{'space'} |
560
|
0 |
0 |
unless defined $$param{'namespace'} |
561
|
0 |
0 |
unless exists $$self{'namespaces'}{$$param{'namespace'}} |
564
|
0 |
0 |
$pnames{'use_index'} ? : |
|
0 |
0 |
unless defined $$param{'use_index'} |
565
|
0 |
0 |
unless exists $$ns{'index_names'}{$$param{'use_index'}} |
568
|
0 |
0 |
if (exists $pnames{'raw'}) |
569
|
0 |
0 |
unless defined $$param{'raw'} |
570
|
0 |
0 |
unless defined $$param{'raw'} |
610
|
0 |
0 |
if defined $$param{'raise'} |
612
|
0 |
0 |
if $$self{'debug'} >= 4 |
613
|
0 |
0 |
if grep {not defined $_;} @$tuple |
615
|
0 |
0 |
unless exists $$param{'unpack'} or exists $$param{'unpack_format'} and $$param{'unpack_format'} |
619
|
0 |
0 |
if ($unpack_format) |
620
|
0 |
0 |
if ref $unpack_format |
626
|
0 |
0 |
if $unpack_format |
627
|
0 |
0 |
if $unpack_format |
631
|
0 |
0 |
if &Encode::is_utf8($x, 0) |
695
|
0 |
0 |
@_ && ref $_[-1] eq 'HASH' ? : |
701
|
0 |
0 |
@_ && ref $_[-1] eq 'HASH' ? : |
707
|
0 |
0 |
@_ && ref $_[-1] eq 'HASH' ? : |
716
|
0 |
0 |
if $$self{'debug'} >= 3 |
718
|
0 |
0 |
unless defined $$param{'want_result'} |
721
|
0 |
0 |
if $$param{'want_result'} |
724
|
0 |
0 |
if ($$param{'action'} eq 'add') { } |
|
0 |
0 |
elsif ($$param{'action'} eq 'replace') { } |
|
0 |
0 |
elsif ($$param{'action'} ne 'set') { } |
734
|
0 |
0 |
$$namespace{'long_tuple'} ? : |
735
|
0 |
0 |
if 0 != (@tuple - @$fmt) % $chk_divisor |
737
|
0 |
0 |
if ref $tuple[$_] |
739
|
0 |
0 |
if &Encode::is_utf8($_, 0) |
740
|
0 |
0 |
if (exists $$chkkey{$_}) |
741
|
0 |
0 |
if ($$chkkey{$_}) { } |
742
|
0 |
0 |
unless defined $tuple[$_] |
744
|
0 |
0 |
unless looks_like_number($tuple[$_]) and int $tuple[$_] == $tuple[$_] |
747
|
0 |
0 |
$_ < @$fmt ? : |
750
|
0 |
0 |
if $$self{'debug'} >= 4 |
755
|
0 |
0 |
if ($$param{'want_result'}) |
760
|
0 |
0 |
if $$param{'callback'} |
768
|
0 |
0 |
unless my $r = $self->_chat('msg', 13, 'payload', pack('LLL (w/a*)*', $$namespace{'namespace'}, $flags, scalar @tuple, @tuple), 'unpack', sub {
$self->_unpack_affected($flags, $namespace, @_);
}
, 'callback', $$param{'callback'} && $cb) |
771
|
0 |
0 |
if $$param{'callback'} |
778
|
0 |
0 |
if length $_[3] < 4 |
780
|
0 |
0 |
if $$self{'debug'} >= 3 |
785
|
0 |
0 |
if length $_[3] < 8 |
787
|
0 |
0 |
if $$self{'debug'} >= 4 |
788
|
0 |
0 |
if length $_[3] < $len |
790
|
0 |
0 |
if $$self{'debug'} >= 6 |
793
|
0 |
0 |
if not @tuple or $@ |
794
|
0 |
0 |
if $$self{'debug'} >= 5 |
815
|
0 |
0 |
$flags & 1 ? : |
826
|
0 |
0 |
if (@$keys == 1) { } |
830
|
0 |
0 |
if ref $_ eq 'ARRAY' |
831
|
0 |
0 |
if &Encode::is_utf8($_, 0) |
832
|
0 |
0 |
unless ($strkey) |
833
|
0 |
0 |
unless looks_like_number $_ and int $_ == $_ |
840
|
0 |
0 |
ref $k eq 'ARRAY' ? : |
|
0 |
0 |
unless ref $k eq 'ARRAY' and @$k and @$k <= @$keys |
842
|
0 |
0 |
unless ($$strkey{$$keys[$i]}) |
843
|
0 |
0 |
unless looks_like_number($$k[$i]) and int $$k[$i] == $$k[$i] |
845
|
0 |
0 |
if &Encode::is_utf8($$k[$i], 0) |
855
|
0 |
0 |
unless @keys |
858
|
0 |
0 |
if ($$param{'format'}) |
859
|
0 |
0 |
if $$namespace{'long_tuple'} |
864
|
0 |
0 |
if ($$_{'full'}) |
868
|
0 |
0 |
if $$_{'length'} eq 'max' |
877
|
0 |
0 |
if (not $$param{'raw'}) |
880
|
0 |
0 |
if (@utf8_fields or $long_utf8_fields and @$long_utf8_fields) |
884
|
0 |
0 |
if ($long_tuple and @$long_utf8_fields) |
893
|
0 |
0 |
if ($hashify) { } |
|
0 |
0 |
elsif ($$namespace{'fields'}) { } |
899
|
0 |
0 |
if ($$namespace{'long_tuple'}) |
901
|
0 |
0 |
if $$namespace{'long_fields'} |
905
|
0 |
0 |
if ($last) |
906
|
0 |
0 |
if @f_long |
1008
|
0 |
0 |
unless defined wantarray |
1011
|
0 |
0 |
if defined $$param{'raise'} |
1012
|
0 |
0 |
if @keys and ref $keys[0] eq 'ARRAY' and 1 == @{$$param{'index'}{'keys'};} || @keys && ref $keys[0][0] eq 'ARRAY' |
1014
|
0 |
0 |
ref $_ ? : |
|
0 |
0 |
if $$self{'debug'} >= 3 |
1017
|
0 |
0 |
if (exists $$param{'next_rows'}) { } |
1018
|
0 |
0 |
if @keys != 1 or not $$param{'next_rows'} |
1024
|
0 |
0 |
$$param{'format'} ? : |
1027
|
0 |
0 |
if $$param{'unpack_format'} |
1037
|
0 |
0 |
if $r |
1039
|
0 |
0 |
if ($r and defined(my $p = $$param{'hash_by'})) |
1041
|
0 |
0 |
if (@$r) |
1042
|
0 |
0 |
if (ref $$r[0] eq 'HASH') { } |
|
0 |
0 |
elsif (ref $$r[0] eq 'ARRAY') { } |
1043
|
0 |
0 |
unless exists $$r[0]{$p} |
1046
|
0 |
0 |
unless $p =~ /^\d+$/ and $p >= 0 and $p < @{$$r[0];} |
1055
|
0 |
0 |
if ($$param{'callback'}) |
1059
|
0 |
0 |
if ($$param{'return_fh'} and ref $$param{'return_fh'} eq 'CODE') |
1063
|
0 |
0 |
unless $r |
1065
|
0 |
0 |
if defined $$param{'hash_by'} |
1066
|
0 |
0 |
if $$param{'want'} eq 'arrayref' |
1067
|
0 |
0 |
if $$param{'return_fh'} |
1069
|
0 |
0 |
if ($wantarray) { } |
1072
|
0 |
0 |
if @keys > 1 |
1077
|
0 |
0 |
if (@keys and $payload) { } |
1082
|
0 |
0 |
$$param{'return_fh'} ? : |
|
0 |
0 |
$$param{'callback'} ? : |
|
0 |
0 |
$$param{'return_fh'} ? : |
|
0 |
0 |
unless $r = $self->_chat('msg', $msg, 'payload', $payload, 'unpack', sub {
$self->_unpack_select($namespace, 'SELECT', @_);
}
, 'retry', $$param{'return_fh'} ? 1 : $$self{'select_retry'}, 'timeout', $$param{'timeout'} || $$self{'select_timeout'}, 'callback', $$param{'callback'} ? $cb : 0, 'return_fh', $$param{'return_fh'} ? $cb : 0) |
1087
|
0 |
0 |
if $$param{'return_fh'} |
1088
|
0 |
0 |
if $$param{'callback'} |
1100
|
0 |
0 |
unless @reqs |
1101
|
0 |
0 |
if defined $$param{'raise'} |
1102
|
0 |
0 |
if grep {ref $_ ne 'ARRAY';} @reqs |
1116
|
0 |
0 |
unless my $r = $self->_chat('msg', 18, 'payload', pack('L (a*)*', scalar @reqs, map({$$_{'payload'};} @reqs)), 'unpack', sub {
$self->_unpack_select_multi([map({$$_{'namespace'};} @reqs)], 'SMULTI', @_);
}
, 'retry', $$self{'select_retry'}, 'timeout', $$param{'select_timeout'} || $$self{'timeout'}, 'callback', $$param{'callback'}) |
1120
|
0 |
0 |
if @$r != @reqs |
1165
|
0 |
0 |
unless defined $$param{'want_result'} |
1168
|
0 |
0 |
if $$param{'want_result'} |
1170
|
0 |
0 |
if $$self{'debug'} >= 3 |
1172
|
0 |
0 |
unless 1 == @{$$param{'index'}{'keys'};} |
1178
|
0 |
0 |
if ($$param{'want_result'}) |
1183
|
0 |
0 |
if $$param{'callback'} |
1191
|
0 |
0 |
$flags ? : |
|
0 |
0 |
$flags ? : |
|
0 |
0 |
unless my $r = $self->_chat('msg', $flags ? 21 : 20, 'payload', $flags ? pack('L L a*', $$namespace{'namespace'}, $flags, $key) : pack('L a*', $$namespace{'namespace'}, $key), 'unpack', sub {
$self->_unpack_affected($flags, $namespace, @_);
}
, 'callback', $$param{'callback'} && $cb) |
1194
|
0 |
0 |
if $$param{'callback'} |
1241
|
0 |
5 |
unless eval "\n sub " . $op . " {\n my \$param = ref \$_[-1] eq 'HASH' ? pop : {};\n my (\$self, \$key, \$field_num, \$val) = \@_;\n \$self->UpdateMulti(\$key, [ \$field_num => " . lc($op) . " => \$val ], \$param);\n }\n 1;\n " |
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
1332
|
0 |
0 |
$_ ? : |
|
0 |
0 |
if $$self{'debug'} >= 3 |
1334
|
0 |
0 |
unless 1 == @{$$param{'index'}{'keys'};} |
1335
|
0 |
0 |
if scalar @op > 128 |
1337
|
0 |
0 |
unless defined $$param{'want_result'} |
1340
|
0 |
0 |
if $$param{'want_result'} |
1348
|
0 |
0 |
if ref $_ ne 'ARRAY' or @$_ != 3 |
1352
|
0 |
0 |
if (ref $field_num eq 'ARRAY' and $long_fmt) { } |
|
0 |
0 |
elsif ($field_num =~ /^[A-Za-z]/) { } |
1354
|
0 |
0 |
if ($n =~ /^[A-Za-z]/) |
1355
|
0 |
0 |
unless exists $$long_fields_hash{$n} |
1360
|
0 |
0 |
unless exists $$fields_hash{$field_num} |
1364
|
0 |
0 |
if $field_num >= @$fmt and $long_fmt |
1366
|
0 |
0 |
$$namespace{'string_keys'}{$field_num} ? : |
1369
|
0 |
0 |
if ($op eq 'bit_set') { } |
|
0 |
0 |
elsif ($op eq 'bit_clear') { } |
|
0 |
0 |
elsif ($op =~ /^num_(add|sub)$/) { } |
1375
|
0 |
0 |
if $1 eq 'sub' |
1378
|
0 |
0 |
unless exists $update_ops{$op} |
1384
|
0 |
0 |
if exists $update_ops{$op} |
1387
|
0 |
0 |
if $ops_type{$op} ne $field_type and $ops_type{$op} ne 'any' |
1389
|
0 |
0 |
unless ref $value |
1390
|
0 |
0 |
if ref $value ne 'ARRAY' |
1392
|
0 |
0 |
if $field_num >= @$fmt and not defined $long_field_num |
1393
|
0 |
0 |
if defined $long_field_num and $long_field_num >= @$long_fmt |
1404
|
0 |
0 |
if ($$param{'want_result'}) |
1409
|
0 |
0 |
if $$param{'callback'} |
1417
|
0 |
0 |
unless my $r = $self->_chat('msg', 19, 'payload', pack('LL a* L (a*)*', $$namespace{'namespace'}, $flags, $key, scalar @op, @op), 'unpack', sub {
$self->_unpack_affected($flags, $namespace, @_);
}
, 'callback', $$param{'callback'} && $cb) |
1420
|
0 |
0 |
if $$param{'callback'} |
1425
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
1431
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
1434
|
0 |
0 |
if defined $and |
1435
|
0 |
0 |
if defined $xor |
1436
|
0 |
0 |
if defined $add |
1441
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
1443
|
0 |
0 |
if grep {not /^(bit_clear|bit_set|set)$/;} keys %arg |
1448
|
0 |
0 |
if exists $arg{'set'} |
1449
|
0 |
0 |
if $arg{'bit_clear'} |
1450
|
0 |
0 |
if $arg{'bit_set'} |
1456
|
0 |
0 |
ref $_[-1] eq 'HASH' ? : |
1458
|
0 |
0 |
if grep {not /^(num_add|num_sub|set)$/;} keys %arg |
1465
|
0 |
0 |
if exists $arg{'set'} |