in reply to Re^3: Use method/function signatures with Perl
in thread Use method/function signatures with Perl
I think if you read the POD closely, you'll see Params::Validate does what you want. E.g. (from the POD,
my @p = validate( @_, 1, { default => 99 } );
You can also set a global on_fail callback to die however you want.
-xdg
Code posted by xdg on PerlMonks is public domain. It has no warranties, express or implied. Posted code may not have been tested. Use at your own risk.
In Section
Meditations