Changeset 449d2b


Ignore:
Timestamp:
06/15/09 22:17:00 (3 years ago)
Author:
Tomash Brechko <tomash.brechko@…>
Branches:
master
Children:
a4fd16
Parents:
49f983
git-author:
Tomash Brechko <tomash.brechko@…> (06/15/09 12:58:38)
git-committer:
Tomash Brechko <tomash.brechko@…> (06/15/09 22:17:00)
Message:

Update documentation for incr/decr that require a numeric value now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lib/Cache/Memcached/Fast.pm

    r00ce57 r449d2b  
    8181 
    8282  my @counters = qw(c1 c2); 
     83  $memd->set_multi(map { [$_, 0] } @counters, 'c3', 'c4'); 
    8384  $memd->incr_multi(['c3', 2], @counters, ['c4', 10]); 
    8485 
     
    984985  $memd->incr($key, $increment); 
    985986 
    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. 
     987Increment the value for the I<$key>.  Starting with B<memcached> 1.3.3 
     988I<$key> should be set to a number or the command will fail.  An 
     989optional I<$increment> should be a positive integer, when not given 1 
     990is assumed.  Note that the server doesn't check for overflow. 
    990991 
    991992I<Return:> unsigned integer, new value for the I<$key>, or false for 
     
    10291030  $memd->decr($key, $decrement); 
    10301031 
    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. 
     1032Decrement the value for the I<$key>.  Starting with B<memcached> 1.3.3 
     1033I<$key> should be set to a number or the command will fail.  An 
     1034optional I<$decrement> should be a positive integer, when not given 1 
     1035is assumed.  Note that the server I<does> check for underflow, attempt 
     1036to decrement the value below zero would set the value to zero. 
     1037Similar to L<DBI|DBI>, zero is returned as I<"0E0">, and evaluates to 
     1038true in a boolean context. 
    10371039 
    10381040I<Return:> unsigned integer, new value for the I<$key>, or false for 
Note: See TracChangeset for help on using the changeset viewer.