Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 119139
Status: resolved
Priority: 0/
Queue: Params-ValidationCompiler

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

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



Subject: Using type as params value can be surprising
If you attempt to use a type as the value to params, it will be used as a boolean value indicating that the parameter is required. This isn't really incorrect, but can be misleading. use MooseX::Types::Moose qw(Int); validation_for( params => { some_param => Int, }, ); If you see code like this, you would expect it to restrict to a specific type, but that isn't what it ends up doing. I think it would be good if P::VC could warn about this case.