Re: How to pre-open files in apache's processes

Xiao Lan <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Thu, Dec 2, 2010 at 5:58 PM, Hendrik Schumacher <[email protected]> wrote:

>
> In the perl file that holds your handler declare a variable on module level:
>
> my $qqwry = undef;
>
> In the handler instantiate the object if $qqwry is undefined:
>
> if (not $qqwry)
> {
>  $qqwry = IP::QQWry->new('QQWry.Dat');
> }
>
> This way the file should be opened only once in each apache process (which
> should be good enough for performance reasons). The my $qqwry on module
> level should be persistent in each process.
>


Hi,

I'm not sure, what's "the perl file that holds your handler"?
My hanlder is a perl package, which file will hold this package?

Thanks.
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.