projects
/
perl-Redis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8f10dd2
)
cleanup NX variants of commands
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 21 Mar 2009 23:39:20 +0000
(23:39 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sat, 21 Mar 2009 23:39:20 +0000
(23:39 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/Redis@15
447b33ff
-793d-4489-8442-
9bea7d161be5
lib/Redis.pm
patch
|
blob
|
history
diff --git
a/lib/Redis.pm
b/lib/Redis.pm
index
2eabb7b
..
745d9ad
100644
(file)
--- a/
lib/Redis.pm
+++ b/
lib/Redis.pm
@@
-111,7
+111,7
@@
sub ping {
sub set {
my ( $self, $k, $v, $new ) = @_;
- print $sock
( $new ? "SETNX" : "SET"
) . " $k " . length($v) . "\r\n$v\r\n";
+ print $sock
"SET" . ( $new ? 'NX' : ''
) . " $k " . length($v) . "\r\n$v\r\n";
_sock_ok();
}
@@
-227,7
+227,7
@@
sub randomkey {
=head2 rename
- my $ok = $r->rename( 'old-key', 'new-key', $
only_if_
new );
+ my $ok = $r->rename( 'old-key', 'new-key', $new );
=cut