On Fri, Mar 25, 2016 at 10:11 AM, John Dunlap <j...@lariat.co> wrote:
>
> Basically, I have a module which has a some lexically scoped variables in
> it. These variables are used by accessor methods in the package. The
> problem is that, if I use this module in certain parts of my application,
> these variables are mysteriously empty even though I am certain that I've
> already initialized them.
>

How do you initialize them? In code that runs at compile-time in the same
module? In calls from httpd.conf or startup.pl? Is this an OO module with a
declared package name?


> Is there a way for a single perl interpreter to have multiple copies of a
> lexical variable?
>

No, but keep in mind that mod_perl is running inside multiple httpd
processes and each one has a separate interpreter with unique copies of all
lexicals.

- Perrin

Reply via email to