On Fri, Jun 22, 2012 at 10:18 AM, Ovid <curtis_ovid_poe@yahoo.com> wrote:
> From: sawyer x <xsawyerx@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.