mnunberg / perl-Couchbase-Client

Perl Client for Couchbase
http://www.couchbase.com
16 stars 11 forks source link

counter() complains about `amount` #29

Closed ivulfson closed 10 years ago

ivulfson commented 10 years ago
    my $doc = Couchbase::Document->new('test');
    $CB->counter($doc, { initial => 1, amount => 1 });

You get this warning:

Unrecognized key 'amount' at ./t line 24.

but the increment actually works (i.e, value does get incremented).

ivulfson commented 10 years ago

As an extension of this bug, decr() is broken, since you can't specify amount=>-1.

mnunberg commented 10 years ago

The correct parameter is delta. Do the docs say amount? If so, I should fix one or the other. Not decided on which one makes more sense, though.

mnunberg commented 10 years ago

Oh, I see, the docs use amount.

ivulfson commented 10 years ago

Yep, that works. :)