Perl-Sensitive Sunglasses | |
PerlMonks |
Re: How to use require...by fruiture (Curate) |
on Jan 03, 2004 at 09:54 UTC ( [id://318486]=note: print w/replies, xml ) | Need Help?? |
Ok, autouse is of course ver elegant. I'd probably used something like the following, to save subroutne names.
But anyway, there's a slight problem about your code. Imagine somehow the "action" parameter is filled with nonsense, which should happen at least when you want to test your script. You'll get:
Simply because $query might contain "foo" (which does not exist in %actions). Just add a check to your code:
HTH. --http://fruiture.de
In Section
Seekers of Perl Wisdom
|
|