in reply to Re: mod_perl / mason - variable shared between apache2's children
in thread mod_perl / mason - variable shared between apache2's children
I think that's irrelevant here. What matters is not _how_ you populate those variables, but the fact that you only want to do it once per server instance.
In ASP and Cold Fusion there's the concept of Application vairables, which are shared between all requests and processes of the server. They were great for configuration options to your application. You'd load them once (from a real config file or a DB most likely; either way relatively slow), and then you could just use the variables in each request without much overhead.
The most common way to emulate these in perl and PHP seems to be populating the variables on each request, which has always seemed somewhat wasteful to me. (when running under mod_perl I suspect there's probably a way to have real shared variables; I've never used Perl much for web programming myself)