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

Reply via email to