Skip Menu |

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

Report information
The Basics
Id: 30336
Status: new
Priority: 0/
Queue: Params-Smart

People
Owner: Nobody in particular
Requestors: dekimsey [...] gmail.com
Cc:
AdminCc:

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



Subject: req vs opt named parameters when using aliases
Error: "a required parameter cannot follow an optional parameter at / home/signinr/perl/Params/Smart.pm line 138" The documentation doesn't really describe the behavior, but apparently the use of an alias removes the required attribute from a parameter. Thus a sequence of 'required' parameters when one in the middle has an alias will cause the entire parse to fail and croak with a mysterious error. Example: @template = ( { name => 'first', required => 1, }, { name => 'second|2nd', required => 1, }, { name => 'third', required => 1, }); Will cause a croak because the second parameter has its required attribute removed, and the third parameter is required thus failing the libraries check for this behavior.