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
In reply to Re^2: Is modifying the symbol table to redefine subroutines evil?
by tlm
in thread Is modifying the symbol table to redefine subroutines evil?
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |