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
Father Chrysostomos
January 28, 2014 00:02
Re: [perl #121077] [PATCH] Optimise 'my $x; my $y' into 'my ($x, $y)'
Message ID:
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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About