Re: Shared var between processes

André Warnier (tomcat) <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On 22.10.2017 09:45, Ben RUBSON wrote:
> On 21 Oct 2017 08:53, André Warnier (tomcat) wrote:
>
>> On 20.10.2017 17:15, Adam Prime wrote:
>>> On 17-10-20 05:17 AM, André Warnier (tomcat) wrote:
>>>> On 20.10.2017 10:50, Ben RUBSON wrote:
>>>>> On 20 Oct 2017 10:38, André Warnier (tomcat) wrote:
>>>> I believe that there is much more of a performance hit, when asking the server to set up
>>>> an environment ($ENV) for sub-processes, than via the PerlSetVar mechanism.
>>>
>>> You don't need to use $ENV. If you're using handlers you could use
>>> $r->server()->server_hostname.
>>>
>>> You could certainly create a big hash at startup and grab stuff out of it that way, where
>>> the top level key is the hostname.
>>
>> Assuming that you wanted to do this, where would you put this big hash, so that it is
>> persistent across requests, and can be accessed by mod_perl handlers ?
>
> If it's a read-only hash, then a startup script (PerlPostConfigRequire) as Adam proposed
> before seems to be the right way.

Yes, but where exactly do you keep that hash, so that it is accessible later on by 
mod_perl handlers ? (across requests)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.