[Dancer-users] Dancer logging stringifies some data
Mr. Puneet Kishor
punk.kish at gmail.com
Fri Jun 22 16:06:45 CEST 2012
On Jun 21, 2012, at 9:30 PM, Ovid wrote:
> I don't have the time to fix this right now, but we had a very interesting issue. I had this line in my code:
>
> info "Bidding on auction $id", $bid;
>
> That turned out to be a massive bug!
>
> $bid is a hashref that gets serialized to JSON. Unfortunately, the act of printing out the data flipped one value from an NV (float) to a PV (string). That caused the JSON serializer render 1.2 as "1.2".
I too would like to see this work correctly. For now, I simply traverse the entire data structure and multiply each numeric value by 1 to ensure it doesn't get stringified when converted to JSON.
--
Puneet Kishor
More information about the Dancer-users
mailing list