We don't bite newbies here... much | |
PerlMonks |
Re: Is modifying the symbol table to redefine subroutines evil?by doom (Deacon) |
on Apr 13, 2007 at 19:31 UTC ( [id://609991]=note: print w/replies, xml ) | Need Help?? |
In your example it would be mildly evil, because it's excessively complicated for what you want to do (any speed advantage you get from it is unlikely to be big enough to matter).
In principle it isn't though -- I know one team of programmers that likes to use a trick like this to swap in mock code during testing.
In Section
Seekers of Perl Wisdom
|
|