Skip Menu |

This queue is for tickets about the Net-CouchDb CPAN distribution.

Report information
The Basics
Id: 44804
Status: resolved
Priority: 0/
Queue: Net-CouchDb

People
Owner: Nobody in particular
Requestors: james2vegas [...] aim.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.02
Fixed in: (no value)



Subject: POSTing a Document without setting an id fails
When I create a document like this: my $doc = Net::CouchDb::Document->new(); $doc->colours = [qw(blue green orange)]; Then post it with $db->post($doc); couchdb returns a 'bad request' error: 'Document id must be a string'. Since the REST API creates a new ID for POSTed documents even if you pass one into the POST request*, any ID should be removed (and undef/null ID especially). Patch attached is one possible fix (deletes undef _ids from the document). I didn't take the extra step of removing any IDs from POSTed documents. *on couchdb 0.9.0
Subject: patch-lib_Net_CouchDb_pm
Download patch-lib_Net_CouchDb_pm
application/octet-stream 456b

Message body not shown because it is not plain text.

Sorry, didn't see this bug report for some reason. I'm not maintaining this module anymore (I suggest you use CouchDB::Client instead). A new release will be hitting CPAN shortly suggesting that, plus a fix for this bug (I believe).