in reply to Is modifying the symbol table to redefine subroutines evil?
If call_me_only_once() really should only be called once, then why not solve the problem there instead of in its caller? (You've already seen how to enforce single execution by scoping a variable outside the sub.)
Addressing the problem there would mean you wouldn't need to worry about bar() making a call to call_me_only_once(); presumably your program knows the answer to that question already.
--Belden
|
|---|