develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #45265] my (my $a) is legal syntax

Thread Previous
From:
Dan Collins via RT
Date:
July 16, 2016 23:01
Subject:
[perl #45265] my (my $a) is legal syntax
Message ID:
rt-4.0.18-19101-1468710077-1043.45265-15-0@perl.org
This was "fixed", and there is now a test for it in t/lib/croak/toke

dcollins@nightshade64:~/toolchain/perl$ perl5.23.1 -wle 'my (my $a) = 3; print $a'
3
dcollins@nightshade64:~/toolchain/perl$ perl5.23.2 -wle 'my (my $a) = 3; print $a'
Can't redeclare "my" in "my" at -e line 1, at end of line
Execution of -e aborted due to compilation errors.

-- 
Respectfully,
Dan Collins

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

Thread Previous


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