Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by sfink (Deacon)
on Apr 15, 2007 at 15:42 UTC ( #610206=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
      no strict 'refs';
      my $pkg = caller;
      *{ $pkg . "::foo" } = sub { ... }; # the final foo
    
  2. or download this
    sub foo {
      our $CALL_COUNT;
      call_me_only_once() unless $CALL_COUNT++;
      ...do stuff...
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2014-12-20 12:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls