/[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 7 by dpavlin, Sat Mar 21 22:38:56 2009 UTC revision 8 by dpavlin, Sat Mar 21 22:48:46 2009 UTC
# Line 131  sub incr { Line 131  sub incr {
131          return $count;          return $count;
132  }  }
133    
134    =head2 decr
135    
136      $r->decr('counter');
137      $r->decr('tripplets', 3);
138    
139    =cut
140    
141    sub decr {
142            my ( $self, $key, $value ) = @_;
143            if ( defined $value ) {
144                    print $sock "DECRBY $key $value\r\n";
145            } else {
146                    print $sock "DECR $key\r\n";
147            }
148            my $count = <$sock>;
149            warn "# $key = $count";
150            return $count;
151    }
152    
153  =head1 AUTHOR  =head1 AUTHOR
154    
155  Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>  Dobrica Pavlinusic, C<< <dpavlin at rot13.org> >>

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26