Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: mod_perl / Apache::Registry accidental closures

by runrig (Abbot)
on Jul 21, 2006 at 20:29 UTC ( #562939=note: print w/ replies, xml ) Need Help??


in reply to mod_perl / Apache::Registry accidental closures

When I was bitten by this, I wanted static variables for some functions. I had something like this (very simplified example):

BEGIN { my $var; sub foo { return ++$var; } }
The solution was to move all such subroutines into modules where they wouldn't get wrapped by Apache::Registry.


Comment on Re: mod_perl / Apache::Registry accidental closures
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2014-07-29 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (229 votes), past polls