http://www.perlmonks.org?node_id=609504


in reply to Re: Is modifying the symbol table to redefine subroutines evil?
in thread Is modifying the symbol table to redefine subroutines evil?

call_me_only_once() was meant to represent code that must be executed only on the first call to the function. I hadn't thought of the scenario you present, but I can see that the self-redefinition technique could be useful there too.

the lowliest monk