develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #7615] (if|unless) ( local ... ) not undone

From:
James E Keenan via RT
Date:
May 26, 2012 18:10
Subject:
[perl #7615] (if|unless) ( local ... ) not undone
Message ID:
rt-3.6.HEAD-7788-1338081039-1577.7615-15-0@perl.org
On Sat Sep 10 14:08:31 2005, schwern wrote:
> On Fri, Aug 26, 2005 at 09:06:50AM -0700, Steve Peters via RT wrote:
> > > $a = 10;
> > > if (local $a = 1){
> > > }
> > > print $a; # Should be 10, not 1
> 
> Still busted in 5.8.6 and blead.
> 
> $ bleadperl -wle '$a = 10;  if( local $a = 1 ) {}  print $a'
> Found = in conditional, should be == at -e line 1.
> 1
> $ bleadperl -wle '$a = 10;  if( my $a = 1 ) {}  print $a'
> Found = in conditional, should be == at -e line 1.
> 10
> 
> 

And still busted in 5.16.0.



---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=7615



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