in reply to Re^2: Is modifying the symbol table to redefine subroutines evil?
in thread Is modifying the symbol table to redefine subroutines evil?
Somebody could mess with the package global $FOO_HAS_BEEN_CALLED and blow things up
The "somebody could mess with it" argument has never been valid for Perl. Of course somebody could mess with it! Somebody could mess with absolutely everything in your program. If you want to prevent possible accidental changes, you could make it a lexical instead and let foo() be a closure around it. But no one mentioned security as the reason for this.
I still think it sounds like setup code that should be in some kind of BEGIN or INIT block.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Is modifying the symbol table to redefine subroutines evil?
by bart (Canon) on Apr 12, 2007 at 18:04 UTC | |
|
Re^4: Is modifying the symbol table to redefine subroutines evil?
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 | |
by shmem (Chancellor) on Apr 12, 2007 at 21:35 UTC |