Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re^4: Is modifying the symbol table to redefine subroutines evil?by shmem (Chancellor) |
on Apr 12, 2007 at 05:29 UTC ( [id://609568]=note: print w/replies, xml ) | Need Help?? |
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
In Section
Seekers of Perl Wisdom
|
|