Hi,
I agree making it lexically scoped would be better. I've done that with
all of my other files but this one is used everywhere in the code in a
global manner and would be a lot of work to change.
How would I know if I was using: "threaded httpd MPM"?
Again, it seems to be working just fine under Mod_Perl 1, any idea why
things might be different in Mod_Perl 2?
Thanks,
Justin
-----Original Message-----
From: Philippe M. Chiasson [mailto:suppressed
Sent: Wednesday, April 25, 2007 7:19 PM
To: Justin Luster
Cc: suppressed
Subject: Re: File Handle problems - mod_perl 2.0
On 25-Apr-07, at 8:55 AM, Justin Luster wrote:
> Hi,
>
> Recently I've noticed intermittent problems in the behavior of my
> code when running under Mod_Perl 2.0. This particular code has
> been out there for years with no problems. Recently I've seen a few
> problems and I'm wondering if it has anything to do with Mod_Perl
> 2.0, it has been running fine under Mod_Perl 1 for years.
>
> Basically the problem that I see is once in a while when the file
> is opened the file offset does not appear to be at the beginning of
> the file. After a file is opened I assume the file reader is at
> the beginning of the file but once in a while it seems like it is
> reading from the middle of the file after it is opened. Most of
> the time the code works just fine. Here is the code:
>
> open (authlib::QUESTIONFILE,'<' . $authlib::GlobalPaths[0] .
> $strQstName) or authlib::ssiDie("Can't open the file $strQstName,
> \n", $!, 1);
quthlib::QUESTIONFILE is certainly a global in disguise, any reason
you can't change to the lexically scoped
open(my $questionfile, '<', [...]);
and use that instead.
This would only be a *big* problem if you are using a threaded httpd
MPM with
mod_perl 2.0.
------------------------------------------------------------------------
Philippe M. Chiasson GPG: F9BFE0C2480E7680 1AE53631CB32A107 88C3A5A5
http://gozer.ectoplasm.org/ m/gozer\@(apache|cpan|ectoplasm)\.org/
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.