Skip Menu |
 

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

Report information
The Basics
Id: 118268
Status: new
Priority: 0/
Queue: Params-Check

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

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



Subject: Action on unhandled argument
Download (untitled) / with headers
text/plain 307b
Is there a way to handle arguments that aren't on the list - that would catch typos, something like: my $tmpl = { firstname => { required => 1, defined => 1 }, lastname => { required => 1, store => \$x }, default => sub { warn "unexpected argument $_" }, };
Download (untitled) / with headers
text/plain 448b
On Wed Oct 05 12:45:38 2016, NHORNE wrote: Show quoted text
> Is there a way to handle arguments that aren't on the list - that > would catch typos, something like: > > my $tmpl = { > firstname => { required => 1, defined => 1 }, > lastname => { required => 1, store => \$x }, > default => sub { warn "unexpected argument $_" }, > };
Probably should be 'unknown' not 'default' to be consistent with $ALLOW_UNKNOWN


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.