Re: script attack

Eric Schwartz wrote:

> Brian Wakem <no@xxxxxxxxx> writes:
>> 'local our' is common use in mod_perl.
> Okay, fair enough; all the mod_perl I've done has been with Mason,
> which hides all that with the MasonAllowGlobals Apache directive.
> Even so, I look at those examples, and think, "You know, if they just
> passed variables around, instead of using globals, they wouldn't need
> 'local our' at all."

Yes it's best put to use when porting a load of existing mod_cgi scripts to
mod_perl. Wacking a load of 'local our's in can save hours, and time is

Even so, a global my (and many scripts will have one) will not be shared
correctly between subs, so you use our, but in mod_perl it will hold on to
the memory it used after the script has finished. local our therefore
helps keep memory usage down.

Brian Wakem