You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Philip Mak <pm...@aaanime.net> on 2000/08/04 03:15:08 UTC

Re: Package Lexicals and PerlModule

On Sun, 30 Jul 2000, mgraham wrote:

> Normally, I expect that lexical 'my' vars declared at the package
> scope (i.e. at the top of a file), should be visible to subroutines
> declared in the same package, and should maintain their values between
> calls to those subroutines.

If you are running perl v5.6 or later, I think you can use "our" instead
of "my" and it will do what you want it to do.

As for why it acts this way, I'm not sure...perhaps someone else on this
mailing list can shed some light on this issue.

-Philip Mak (pmak@aaanime.net)