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 08:46
Subject:
Re: [perl #21321] local ${"FOO"} does not work
Message ID:
20030221164655.19012.qmail@plover.com
Rafael Garcia-Suarez <rgarciasuarez@free.fr>:
> Mark Jason Dominus <mjd@plover.com> wrote:
> > 
> > Perhaps the best way to address this would be to extend the peephole
> > optimizer to optimize ${"COMPILE_TIME_CONSTANT"} to
> > $COMPILE_TIME_CONSTANT.
> 
> While not breaking strict 'refs.' As says perlref :
> 
>     use strict 'refs';
>     ${ bareword };      # Okay, means $bareword.
>     ${ "bareword" };    # Error, symbolic reference.

I'm not quite sure what your point is here, but I would say that if
strict 'refs' complains about ${"word"} when "word" is a compile-time
constant, it is defective, and my suggestion will make it less so.  


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