develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [perl #21321] local ${"FOO"} does not work

Thread Previous | Thread Next
From:
Mark Jason Dominus
Date:
February 21, 2003 14:12
Subject:
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
20030221221159.27997.qmail@plover.com

Enache Adrian <enache@rdslink.ro>:
> On Fri, Feb 21, 2003 at 12:26:05PM -0500, Mark Jason Dominus wrote:
> > No, it will not.  It will do what it is programmed to do; it should be
> > easy to arrange for ${"b"} to be optimized to access the global
> > variable $b regardless of whether there is a lexical $b in scope or
> > not.
> 
> The check about 'local $ref' is made in Perl_mod(), which seems
> to happen before the peephole optimizer is run. So you have to
> move the check too elsewhere.
> 

I think we may be discussing different things.  I said nothing at all
about 'local'.  





Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About