Erik Aronesty wrote:

mod_perl should be *extremely* verbose in pointing this change out to
developers, as
it is *extremely* difficult to diagnose.

Maybe ModPerl::Registry should do this, but not mod_perl itself. If someone is trying to get an old CGI script to work under mod_perl then they'd use Registry. But there's no reason to make the rest of us suffer for their old scripts.

Alternatively, it should be fixed.  But I'm not sure how, since most
solutions involve creating
anonymous package scopes which require the recompiling and ruining of
mod_perl's speed
benefits.

No, changing your code's structure or scope is not something that should be 
done automatically.

Maybe there should just be a big fat warning on the top of the CGI
module and at the top of mod_perl,
"Don't use file-scoped lexicals!"  Or something like that.

The problem with that is that they are useful for having things like Singleton's that don't change between invocations of the script (like a Conf object).

--
Michael Peters
Plus Three, LP

Reply via email to