Skip Menu |

This queue is for tickets about the CouchDB-Client CPAN distribution.

Report information
The Basics
Id: 70296
Status: new
Priority: 0/
Queue: CouchDB-Client

People
Owner: Nobody in particular
Requestors: vaclav.novak [...] captaworks.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: listDocs doesn't support include_docs parameter
When I call the listDocs method of a Couch DB, I can add a parameter indicating that I want the returned documents filled with the data: my $all_docs = $db->listDocs(include_docs => 'true'); The module correctly passes the option, the database returns the data, but then the module throws them away and they won't get it to $all_docs. I think listDocs behavior should change to include the data when the user requested them. I'm attaching a patch for CouchDB/Client/DB.pm version 0.09 that worked for me.
Subject: DB.pm_v0.09.patch
121c121,122 < $_->{value}->{_rev} # older versions may return it here. --- > $_->{value}->{_rev}, # older versions may return it here. > ($_->{doc} ? (data => $_->{doc}) : ()), 129c130 < return [ map { $self->newDoc($_->{id}, $_->{rev}) } @{$self->listDocIdRevs(%args)} ]; --- > return [ map { $self->newDoc($_->{id}, $_->{rev}, $_->{data}) } @{$self->listDocIdRevs(%args)} ];