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

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

Thread Previous | Thread Next
From:
Ronald J Kimball
Date:
February 21, 2003 06:09
Subject:
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
20030221140922.GA632050@linguist.thayer.dartmouth.edu
On Fri, Feb 21, 2003 at 10:01:15AM +0100, A. Bergman wrote:
> 
> On fredag, feb 21, 2003, at 00:05 Europe/Stockholm, Ronald J Kimball 
> wrote:
> 
> >
> >Lexical variables do not live in the symbol table, so they cannot be
> >accessed through symbolic references.
> 
> Whilst it true that they do not live in the symbol table, I doubt that 
> is the reason they can't be accessed through symbolic references since 
> perl wouldn't have much trouble looking up a lexical by name.

perldoc perlref:

       Only package variables (globals, even if localized) are
       visible to symbolic references.  Lexical variables
       (declared with my()) aren't in a symbol table, and thus
       are invisible to this mechanism.


Ronald

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