[Dancer-users] Dancer logging stringifies some data

sawyer x xsawyerx at gmail.com
Fri Jun 22 15:57:07 CEST 2012


On Fri, Jun 22, 2012 at 10:18 AM, Ovid <curtis_ovid_poe at yahoo.com> wrote:

> > 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 :)
>

Actually, there's much to learn about this. As @chromatic showed in his
YAPC::NA2012 talk, sometimes the "wrong" solution is indeed the best one.


>
>     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';
>

I'm going to add such a test to make sure we aren't doing this again.


>
> Reini Urban suggested I use the B module and I might look to see if it's
> more robust.
>

If you have a revision for it, I would appreciate it.

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20120622/8523de62/attachment.htm>


More information about the Dancer-users mailing list