perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiao Lan <practicalp...@gmail.com>
Subject Re: How to pre-open files in apache's processes
Date Thu, 02 Dec 2010 13:24:41 GMT
On Thu, Dec 2, 2010 at 5:58 PM, Hendrik Schumacher <hs@activeframe.de> 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.

Mime
View raw message