[Dancer-users] Dancer logging stringifies some data
Ovid
curtis_ovid_poe at yahoo.com
Fri Jun 22 09:18:45 CEST 2012
> From: sawyer x <xsawyerx at gmail.com>
>The simple fix was to drop the $bid from the info() and add a test to ensure that I have a NV instead of a PV.
>
>Out of interest, how did you perform that test?
Oh damn. I was afraid someone might ask that. Everyone who cares about testing, please turn away now :)
use Devel::Peek 'Dump';
use Capture::Tiny 'capture_stderr';
like capture_stderr { Dump( $price ) }
qr/^SV = [IN]V/, 'A valid bid request should have a numeric price';
Reini Urban suggested I use the B module and I might look to see if it's more robust.
Cheers,
Curtis
--
Live and work overseas - http://www.overseas-exile.com/
Buy the book - http://www.oreilly.com/catalog/perlhks/
Tech blog - http://blogs.perl.org/users/ovid/
Twitter - http://twitter.com/OvidPerl/
More information about the Dancer-users
mailing list