In httpd.conf I have:
<Perl>
$MyPackage::foo = { ... };
</Perl>
According to the docs, this should, since it's qualified, persist into my perl scripts, which are run with the modperl handler. And sometimes they do. But then all I need to do is touch MyPackage.pm, and all of the sudden $MyPackage::foo is now undef. Restart the web server, and it works again.
Anybody have an end to my tears?
My best guess is that the block only gets run once, when the .conf is parsed, and then a new thread picks up the reloaded file. But why doesn't it get run once per thread? Isn't there something I can use besides $ENV and custom directives that gets loaded exactly once per server, and then copied to all interpreters? (I'm probably using the wrong terminology at the end here, but you get the idea.)