XP is just a number | |
PerlMonks |
Re: Is modifying the symbol table to redefine subroutines evil?by Limbic~Region (Chancellor) |
on Apr 11, 2007 at 21:59 UTC ( [id://609502]=note: print w/replies, xml ) | Need Help?? |
tlm,
Depends on your definition of evil and your perspective. Messing with the symbol table like this can certainly be useful. I think a more common version of call_me_only_once() for this would be: The objective being to determine which version of foo() to use (perhaps XS, module, roll-your-own) only once so that subsequent calls are faster. Cheers - L~R
In Section
Seekers of Perl Wisdom
|
|