Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: jiri.sedlacek [...] futu.cz
Cc:
AdminCc:

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



Subject: string keys that consist of numbers
Date: Wed, 24 Nov 2010 16:36:29 +0100
To: bug-CouchDB-Client [...] rt.cpan.org
From: Jiří Sedláček - Futu <jiri.sedlacek [...] futu.cz>
Hi, I just bumped into a problem with CouchDB::Client::DesignDoc. I emit string keys in my view. Sometimes the string consists of numbers only ("1234"). If I query the view with argument key set from Perl, then it fails because the quotes are missing. Expected behavior: GET to this URL is generated by CouchDB::Client::DesignDoc http://localhost:5984/product-sovicka/_design/UserProduct/_view/cards?key='1234' Observed behavior: GET http://localhost:5984/product-sovicka/_design/UserProduct/_view/cards?key=1234 I dug a little and found out that the responsible lines of code are these: lib/CouchDB/Client/DB.pm:245,246 unless ($args{$k} =~ /^\d+(?:\.\d+)*$/s) { $args{$k} = '"' . $args{$k} . '"'; } -- Jiří Sedláček - Futu Finance s.r.o. | jednatel | 604 290 544 | www.futu.cz - Finance pod kontrolou