Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Use method/function signatures with Perl

by xdg (Monsignor)
on Dec 06, 2004 at 19:52 UTC ( [id://412739]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://412739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 19:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found