Am Do, 2.12.2010, 14:24, schrieb Xiao Lan:
> On Thu, Dec 2, 2010 at 5:58 PM, Hendrik Schumacher <h...@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.
>

"In the perl file that holds your handler" means your perl package file.
Sounds more difficult as it was meant. The important thing is that the
variable has to be declared on package level, not inside a sub routine.

Reply via email to