Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by perrin (Chancellor)
on Apr 11, 2007 at 23:17 UTC ( #609522=note: print w/ replies, xml ) Need Help??


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?

Here it is without globals:

{ my $foo_has_been_called; sub foo { if (not $foo_has_been_called) { call_me_only_once(); $foo_has_been_called = 1; } } }


Comment on Re^3: Is modifying the symbol table to redefine subroutines evil?
Download Code
Re^4: Is modifying the symbol table to redefine subroutines evil?
by dewey (Pilgrim) on Apr 12, 2007 at 02:06 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://609522]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2014-07-29 11:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (215 votes), past polls