in reply to Re: mod_perl memory question
in thread mod_perl memory question
When I started my mod_perl app. framework, I'v challenged BEGIN blocks too. Unfortunately, I do not remember, why I left this idea. Well, my part of httpd.conf looks like
And what about global vars. I use them with this rule: Write it when apache starts (all actions are caused under MyFramework::new()) and never later. It gives the chance to share occupied memory between childs. I use $ENV{runtime} for volatile (request related) data.#apache 1.3 PerlSetEnv FRAMEWORK_HOME /usr/local/framework <perl> use lib "$ENV{FRAMEWORK_HOME}/perl"; use MyFramework (); MyFramework::new(); # this new() writes the created instance into # $MyFramework::inst, which is our :) </perl>
I'v found this question when I supersearched caching in apache, so, when I find something important about it, I'll link it here.
|
|---|