Skip Menu |

This queue is for tickets about the Params-Validate CPAN distribution.

Report information
The Basics
Id: 9660
Status: resolved
Priority: 0/
Queue: Params-Validate

People
Owner: DROLSKY [...] cpan.org
Requestors: mark [...] summersault.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.74
Fixed in: 0.86



Subject: allow strings for type defs, in addition to constants
I recently got a strange error with Params::Validate 0.74. It included this string: ... was a 'hashref', which is not one of the allowed types: at ..... What I had in my code was this: my ($in) = validate_pos(@_, { type => 'HASHREF' } ); If you notice, you'll see that I put single quotes around 'HASHREF'. Params ::Validate should have either worked gracefully with this (my preference!), or rejected it as an invalid syntax. Thanks, Mark
Date: Wed, 12 Jan 2005 14:32:20 -0600 (CST)
From: Dave Rolsky <autarch [...] urth.org>
To: Guest via RT <bug-Params-Validate [...] rt.cpan.org>
Subject: Re: [cpan #9660] allow strings for type defs, in addition to constants
RT-Send-Cc:
On Wed, 12 Jan 2005, Guest via RT wrote: Show quoted text
> If you notice, you'll see that I put single quotes around 'HASHREF'. > Params ::Validate should have either worked gracefully with this (my > preference!), or rejected it as an invalid syntax.
Detecting and rejecting it is easy enough (I think). Supporting it would be harder. How would you propose you specify multiple types 'scalar|arrayref'? That just seems ugly to me. -dave /*=========================== VegGuide.Org Your guide to all that's veg. ===========================*/