Skip Menu |

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

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

People
Owner: DROLSKY [...] cpan.org
Requestors: djerius [...] head-cfa.harvard.edu
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.50
Fixed in: 0.63



Subject: validate_with barfs at named parameter hashref
validate_with doesn't handle named parameters passed as a hashref. Here's some example code and the error I get: 1 use Params::Validate qw/ :all /; 2 3 func( { foo => 'goo' } ); 4 5 sub func 6 { 7 validate( @_, { foo => 1 } ); 8 validate_with( params => \@_, spec => { foo => 1 } )); 9 } % perl bb.pl Odd number of parameters in call to main::func when named parameters were expected eval {...} called at bb.pl line 8 main::func('HASH(0x106144)') called at bb.pl line 3