[VPM] FW: overriding perl 'our','my' keywords

Tyler MacDonald tyler at yi.org
Tue Mar 17 16:12:22 PDT 2009


Jer,

	"my" variables should be cleared between requests, since
ModPerl::Registry wraps your code inside a subroutine.

	For "our" variables -- you may want to consider converting the ones
you are concerned about to "my"'s... that is really what scoping is designed
for. :-)

		- Tyler


Jer A <jeremygwa at hotmail.com> wrote:
> 
> 
> I know this, but I am using modperl, and do not want to use any of the api or modules eg.
> 
> because of modperl, scalers have to be cleared between connections.
> 
> I would like make  my cgi script, compatible with modperl, without hardly changing code.
> 
> 
> -Jeremy
> 
> 
> 
> 
> 
> > Date: Tue, 17 Mar 2009 16:01:54 -0700
> > From: darren at darrenduncan.net
> > To: victoria-pm at pm.org
> > Subject: Re: [VPM] FW: overriding perl 'our','my' keywords
> > 
> > Jer A wrote:
> > > I want to override all 'our' and all 'my' statements in a script. how do 
> > > i do this, without any third party modules, just code.
> > > 
> > > this may sound funny, but I would like to initialize all declared 
> > > variables to 'undef' or '()'.
> > 
> > Perl variables are already that way by default, so you have nothing to do.
> > 
> > Otherwise, you need to give more information on what you actually want to 
> > accomplish.
> > 
> > -- Darren Duncan
> > _______________________________________________
> > Victoria-pm mailing list
> > Victoria-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/victoria-pm
> 
> _________________________________________________________________
> Chat with the whole group, and bring everyone together.
> http://go.microsoft.com/?linkid=9650735
> _______________________________________________
> Victoria-pm mailing list
> Victoria-pm at pm.org
> http://mail.pm.org/mailman/listinfo/victoria-pm

-- 


More information about the Victoria-pm mailing list