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

Re: "Keyword" labels now forbidden (was [perl.git] branch blead, updated. GitLive-blead-1705-gf71d615)

Thread Previous | Thread Next
From:
David Nicol
Date:
July 29, 2009 22:53
Subject:
Re: "Keyword" labels now forbidden (was [perl.git] branch blead, updated. GitLive-blead-1705-gf71d615)
Message ID:
934f64a20907292253i6bc6b78er70a782d84987c5@mail.gmail.com
>>    Forbid labels with keyword names
>
> Interesting.  This "broke" one of my CPAN modules.  Wonder how many
> others it will affect?


Why? I've always considered the fact that you can generally use
keywords as other things in Perl to be a good thing.

$ perl -le 'goto: $x++ > 3 and die 1; print $x; goto goto'
1
goto must have label at -e line 1.

$ perl -le 'goto: $x++ > 3 and die 1; print $x; goto "goto"'
1
2
3
4
1 at -e line 1.

it's already a synbtax error when it makes no sense.  What's the harm?



-- 
"It wasn't worth it." -- Harry Patch

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