Skip Menu |

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

Report information
The Basics
Id: 59625
Status: new
Priority: 0/
Queue: Config-Validate

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'hash' validation assumes values are hashes
I'm trying to validate a hash which looks like this: par => { a => 1, b => 2, c => 3 }; The number of entries may vary; I don't care what the names are, as long as they are strings, and I want to verify that the values are integers. I thought this might work: { par => { type => 'hash', keytype => 'string', child => { type => 'int' } } } but instead I get an error of Can't use string ("1") as a HASH ref while "strict refs" in use. _validate_hash calls _validate with $cfg = $par{a}, and _validate assumes it's getting a hashref. Is there any way of getting this sort of validation? From my perusal of the code it doesn't look possible.