in reply to Re: Whether to use local()
in thread Whether to use local()

You should avoid using "unintended globals" or "file scoped lexicals" (whatever you want to call them) when you are using mod_perl. The mechanism mod_perl uses to keep code in memory will turn your subs into closuresand the values of lexically scoped variables will be stored and used with every execution. For an excellent write up see The mod_perl Guide section my() Scoped Variable and Nested Subroutines.


TGI says moo