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

Report information
The Basics
Id:
118268
Status:
new
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
Wishlist
Broken in:
0.38
Fixed in:
(no value)



Subject: Action on unhandled argument
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 $_" }, };
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 runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

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