@@ -80,6 +80,7 @@ our $VERSION = '0.15';
80
80
print "OK\n" if $memd->decr('nkey', 3) == 12;
81
81
82
82
my @counters = qw(c1 c2);
83
+ $memd->set_multi(map { [$_, 0] } @counters, 'c3', 'c4');
83
84
$memd->incr_multi(['c3', 2], @counters, ['c4', 10]);
84
85
85
86
# Retrieve values.
@@ -983,10 +984,10 @@ B<gets> command first appeared in B<memcached> 1.2.4.
983
984
$memd->incr($key);
984
985
$memd->incr($key, $increment);
985
986
986
- Increment the value for the I<$key > . If current value is not a
987
- number, zero is assumed. An optional I<$increment > should be a
988
- positive integer, when not given 1 is assumed. Note that the server
989
- doesn't check for overflow.
987
+ Increment the value for the I<$key > . Starting with B< memcached > 1.3.3
988
+ I<$key > should be set to a number or the command will fail. An
989
+ optional I< $increment > should be a positive integer, when not given 1
990
+ is assumed. Note that the server doesn't check for overflow.
990
991
991
992
I<Return: > unsigned integer, new value for the I<$key > , or false for
992
993
negative server reply, or I<undef > in case of some error.
@@ -1028,12 +1029,13 @@ learn what the result value is.
1028
1029
$memd->decr($key);
1029
1030
$memd->decr($key, $decrement);
1030
1031
1031
- Decrement the value for the I<$key > . If current value is not a
1032
- number, zero is assumed. An optional I<$decrement > should be a
1033
- positive integer, when not given 1 is assumed. Note that the server
1034
- I<does > check for underflow, attempt to decrement the value below zero
1035
- would set the value to zero. Similar to L<DBI|DBI> , zero is returned
1036
- as I<"0E0" > , and evaluates to true in a boolean context.
1032
+ Decrement the value for the I<$key > . Starting with B<memcached > 1.3.3
1033
+ I<$key > should be set to a number or the command will fail. An
1034
+ optional I<$decrement > should be a positive integer, when not given 1
1035
+ is assumed. Note that the server I<does > check for underflow, attempt
1036
+ to decrement the value below zero would set the value to zero.
1037
+ Similar to L<DBI|DBI> , zero is returned as I<"0E0" > , and evaluates to
1038
+ true in a boolean context.
1037
1039
1038
1040
I<Return: > unsigned integer, new value for the I<$key > , or false for
1039
1041
negative server reply, or I<undef > in case of some error.
0 commit comments