in reply to Re: Is modifying the symbol table to redefine subroutines evil?
in thread Is modifying the symbol table to redefine subroutines evil?
Yes. Next question.Next question: why?
Seriously, what's wrong with a much easier approach like this?
Somebody could mess with the package global $FOO_HAS_BEEN_CALLED and blow things up, and call_me_only_once() gets called twice. Of course, call_me_once() disposing of itself properly after being called would make damn sure it isn't a second time :-)
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Is modifying the symbol table to redefine subroutines evil?
by perrin (Chancellor) on Apr 11, 2007 at 23:03 UTC | |
by bart (Canon) on Apr 12, 2007 at 18:04 UTC | |
by shmem (Chancellor) on Apr 12, 2007 at 05:29 UTC | |
by perrin (Chancellor) on Apr 12, 2007 at 19:51 UTC | |
by shmem (Chancellor) on Apr 12, 2007 at 21:09 UTC | |
by perrin (Chancellor) on Apr 12, 2007 at 21:29 UTC | |
| |
Re^3: Is modifying the symbol table to redefine subroutines evil?
by ikegami (Patriarch) on Apr 12, 2007 at 01:42 UTC |
In Section
Seekers of Perl Wisdom