Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: Predefining sub Parameters

by diotalevi (Canon)
on Jun 24, 2005 at 05:02 UTC ( #469603=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Predefining sub Parameters
in thread Predefining sub Parameters

Validate by number? That's even easier. Seriously, go use Params::Validate when you want to do this sort of thing. Its simple enough for casual use and has enough bells and whistles to do heavy duty things too.

use Params::Validate 'validate_pos'; sub foo { # Three args are required. my ( $foo, $bar, $baz ) = validate_pos( @_, 1, 1, 1 ); ... }


Comment on Re^5: Predefining sub Parameters
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (17)
As of 2014-07-22 15:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (118 votes), past polls