/[Redis.pre-github]/lib/Redis.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Redis.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by dpavlin, Sat Mar 21 23:36:26 2009 UTC revision 15 by dpavlin, Sat Mar 21 23:39:20 2009 UTC
# Line 111  sub ping { Line 111  sub ping {
111    
112  sub set {  sub set {
113          my ( $self, $k, $v, $new ) = @_;          my ( $self, $k, $v, $new ) = @_;
114          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";
115          _sock_ok();          _sock_ok();
116  }  }
117    
# Line 227  sub randomkey { Line 227  sub randomkey {
227    
228  =head2 rename  =head2 rename
229    
230    my $ok = $r->rename( 'old-key', 'new-key', $only_if_new );    my $ok = $r->rename( 'old-key', 'new-key', $new );
231    
232  =cut  =cut
233    

Legend:
Removed from v.14  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26