Skip Menu |

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

Report information
The Basics
Id: 131335
Status: resolved
Priority: 0/
Queue: Validate-Simple

People
Owner: ANDREIP [...] cpan.org
Requestors: perl [...] toby.ink
Cc:
AdminCc:

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



Subject: synopsis example broken in multiple ways
score => { type => 'hash', of => 'non_negative_int', }, Having "of" be a string doesn't work. Should be: score => { type => 'hash', of => { type => 'non_negative_int' }, }, And this: monthly_score => { type => 'hash', of => { type => 'hash', of => { type => 'arrray', callback => sub { @{ $_[0] } < 12; }, } }, } "array" is misspelt with an extra "r", and it is missing a required "of". So it should be: monthly_score => { type => 'hash', of => { type => 'hash', of => { type => 'array', of => { type => 'integer' }, # integer? who knows? callback => sub { @{ $_[0] } < 12; }, } }, }
On Thu Jan 02 07:18:35 2020, TOBYINK wrote: Show quoted text
> score => { > type => 'hash', > of => 'non_negative_int', > }, > > Having "of" be a string doesn't work. Should be: > > score => { > type => 'hash', > of => { type => 'non_negative_int' }, > }, > > And this: > > monthly_score => { > type => 'hash', > of => { > type => 'hash', > of => { > type => 'arrray', > callback => sub { > @{ $_[0] } < 12; > }, > } > }, > } > > "array" is misspelt with an extra "r", and it is missing a required > "of". So it should be: > > monthly_score => { > type => 'hash', > of => { > type => 'hash', > of => { > type => 'array', > of => { type => 'integer' }, # integer? who knows? > callback => sub { > @{ $_[0] } < 12; > }, > } > }, > }
Thank you for the report. Will fix it in the next version. I hope, it will come soon.
For what it's worth, allowing `of` to be a string would be pretty convenient.