develooper Front page | perl.perl5.porters | Postings from January 2014

Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
January 28, 2014 00:02
Subject:
Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'
Message ID:
20140128000222.16682.qmail@lists-nntp.develooper.com
Tony Cook wrote:
> One issue with both patches is deparsing:
> 
> tony@mars:.../git/perl2$ ./perl -Ilib -MO=Deparse -e 'sub foo { my $x; my $y; 1 }'
> sub foo {
>     my($x, $y);
>     1;
> }
> -e syntax OK

What is wrong with that?  It shows how perl understands the code.
Evaluating it produces an op tree that behaves identically.


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