Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by doom (Deacon)
on Apr 13, 2007 at 19:31 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://609991]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 18:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found