[VPM] FW: FW: overriding perl 'our','my' keywords
Jer A
jeremygwa at hotmail.com
Tue Mar 17 16:35:33 PDT 2009
so what people are saying, there is no way to override keywords 'our' or 'my'
optimally i would like something that follows this psuedo code
sub keyword {
($valueref) = @_;
call internal keyword with argument eg. my or our on valueref...dunno, but would i have to declare by val?
if $valueref is a string, clear it "",undef
if $valueref is an array or hash , clear it ()
}
> Date: Tue, 17 Mar 2009 16:27:18 -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: FW: overriding perl 'our','my' keywords
>
> Jer A <jeremygwa at hotmail.com> wrote:
> > 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.
>
> Maybe re-think your encapsulation... you're trying to move from the
> assumption that a script goes away when you're done to the assumption that
> it sticks around forever.
>
> If you still want to be able to call the scripts from CGI, that shouldn't
> be too difficult while changing your object model to support re-entry -- but
> if you're just trying to move over to mod_perl as quickly as possible, i
> strongly suggest you slow down and put out the work to make it compatible
> instead of looking for hacky ways around best practices. :-)
>
> Cheers,
> Tyler
>
_________________________________________________________________
Reinvent how you stay in touch with the new Windows Live Messenger.
http://go.microsoft.com/?linkid=9650731
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/victoria-pm/attachments/20090317/55c1dc0b/attachment-0001.html>
More information about the Victoria-pm
mailing list