Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Is modifying the symbol table to redefine subroutines evil?

by doom (Deacon)
on Apr 13, 2007 at 19:31 UTC ( #609991=note: print w/replies, xml ) Need Help??


in reply to Is modifying the symbol table to redefine subroutines evil?

In your example it would be mildly evil, because it's excessively complicated for what you want to do (any speed advantage you get from it is unlikely to be big enough to matter).

In principle it isn't though -- I know one team of programmers that likes to use a trick like this to swap in mock code during testing.

  • Comment on Re: Is modifying the symbol table to redefine subroutines evil?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://609991]
help
Chatterbox?
[jedikaiti]: 'ello Monks
[hok_si_la]: bueno

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2017-09-22 16:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (264 votes). Check out past polls.

    Notices?