P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
While you're on the subject you ought to check out Damian Conway's Contextual::Return. It lets you specify explicitly (rather than through obscure tricks) what behavior subs will take under various contexts. The control is very fine grained, even letting you specify boolean behavior, numeric behavior, and so on. Documented in its own POD, as well as Perl Best Practices, chapter 9. It's probably not useful as a micro-optimization. But 97% of the time you wouldn't want to care about such things anyway. :) And when you run into one of those 3% situations, be sure to document well why an obscure trick has been applied. Dave In reply to Re: forcing contexts and micro-efficiency
by davido
|
|