perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <per...@primenet.com>
Subject Re: global variables and reparsing question (low priority ;)
Date Fri, 02 Jun 2000 00:46:38 GMT
On Thu, 1 Jun 2000, Marc Lehmann wrote:
> It's easy, I just have to kick my ass each time I want to use a lexical
> for data abstraction and use a package variable instead, with only the
> exception that I have to be very careful that I never re-use the same
> name. This is quite difficult for code that resides in many files (package
> variables are, of course, global to the whole package not just the file or
> the block), but not unsolvable.

The simplest thing is to just not use PerlFreshRestart or Apache::StatINC
(which works in a similar way).  These are generally a bad idea for
production servers anyway, due to their effect on shared memory, and
mostly exist to ease development, although in your case they had the
opposite effect.  There are several warnings about mysterious problems
caused by PerlFreshRestart in the guide, and my impression is that most
people simply avoid it altogether.

If you don't use these your code should work just fine, lexicals,
accessors, and all.

- Perrin


Mime
View raw message