Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Fastcgi and persistence in sub modules

by zwon (Monsignor)
on Nov 28, 2012 at 15:29 UTC ( #1006049=note: print w/ replies, xml ) Need Help??


in reply to Fastcgi and persistence in sub modules

If you have package A that looks like:

package A; use B; use C; ...
and the script
use A; while(1) {...}
Then modules A, B, and C will be loaded during script compilation time. Even if you place use A inside the while loop or after it (see use). If it is a good practice or not depends on your particular conditions. If you have pre-forking server running on some sort of Unix it is advisable to preload modules as it will reduce total memory usage due to COW.


Comment on Re: Fastcgi and persistence in sub modules
Select or Download Code
Re^2: Fastcgi and persistence in sub modules
by Anonymous Monk on Nov 29, 2012 at 08:33 UTC

    Exactly as you have shown. Thank you so much.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2015-07-05 03:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls