in reply to Re^3: Is modifying the symbol table to redefine subroutines evil?
in thread Is modifying the symbol table to redefine subroutines evil?
Because it solves a simple problem in a complex and convoluted way.
I fail to see how re-arranging a single type glob entry is more convoluted (or complex) than having a state variable sitting around which is changed only once and tested every time the sub is called. The latter seems more like useless clutter to me.
One problem with assigning an anonsub to a typeglob is that it will be reported as anonsub by confess and friends.
But it's clear, concise code, its intent is clear. It might be extravagant or even bizarre, but not evil in the sense of utterly bad practice.
--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^5: Is modifying the symbol table to redefine subroutines evil?
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 |