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

[perl #117081] B::Deparse emits invalid code for foreach with lexical

From:
Father Chrysostomos via RT
Date:
May 28, 2013 20:08
Subject:
[perl #117081] B::Deparse emits invalid code for foreach with lexical
Message ID:
rt-3.6.HEAD-2650-1369771669-1452.117081-15-0@perl.org
On Wed Mar 06 12:35:15 2013, mauke- wrote:
> 
> This is a bug report for perl from l.mai@web.de,
> generated with the help of perlbug 1.39 running under perl 5.16.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> % perl -MO=Deparse,-p -e 'for my $i (42) { print $i; }'
> foreach my($i) (42) {
>     print($i);
> }
> -e syntax OK
> % perl -e 'foreach my($i) (42) { print($i); }'
> Missing $ on loop variable at -e line 1.

Fixed in 4da9a2c.

For the record, this only happened with the -p option.

-- 

Father Chrysostomos


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



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