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

Jer A jeremygwa at hotmail.com
Tue Mar 17 16:18:47 PDT 2009



From: jeremygwa at hotmail.com
To: tyler at yi.org
Subject: RE: [VPM] FW: overriding perl 'our','my' keywords
Date: Tue, 17 Mar 2009 16:17:29 -0700









I would like to use 'my', but I need 'our', because the I would like to be able to modifiy the variable outside the static class, so I have to use 'our' to make it public.

-Jeremy



> Date: Tue, 17 Mar 2009 16:12:22 -0700
> From: tyler at yi.org
> To: jeremygwa at hotmail.com
> CC: darren at darrenduncan.net; victoria-pm at pm.org
> Subject: Re: [VPM] FW: overriding perl 'our','my' keywords
> 
> 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
> 
> -- 

Make your Messenger window look the way you want.  Express Yourself!
_________________________________________________________________
Share photos with friends on Windows Live Messenger
http://go.microsoft.com/?linkid=9650734
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/victoria-pm/attachments/20090317/f8455b3f/attachment.html>


More information about the Victoria-pm mailing list