|
|
| "be consistent" | |
| PerlMonks |
Re: variable processing and checking in one statementby ig (Priest) |
| on Aug 07, 2012 at 04:37 UTC ( #985875=note: print w/ replies, xml ) | Need Help?? |
|
How about
Have checkFn return the passed data if all is well, or undef if not and have doSthWith check its arguments. Or, incorporate the check into doSthWith - depending on where you want to localize the knowledge about the condition, and how you want to handle the race between the check and what you do with $test And, I don't advocate this but find the range of possibilities interesting and can't seem to stop myself from updating:
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||