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:
Chip Salzenberg
Date:
July 30, 2009 13:43
Subject:
Re: "Keyword" labels now forbidden (was [perl.git] branch blead,updated. GitLive-blead-1705-gf71d615)
Message ID:
20090730204310.GJ6796@tytlal.topaz.cx
On Thu, Jul 30, 2009 at 07:57:48PM +0100, Nicholas Clark wrote:
> On Thu, Jul 30, 2009 at 11:53:37AM -0700, David E. Wheeler wrote:
> > On Jul 30, 2009, at 10:27 AM, Chip Salzenberg wrote:
> > 
> > >First, how about if we disallow only the BEGIN-family of keywords as  
> > >labels?
> > >Considering the original bug report those are the ones that can cause
> > >trouble.  Writing "for: {}" is weird but why should we stop you,  
> > >really?
> > 
> > I think just disallowing the uppercase keywords would be sufficient.
> 
> Except that the problem is the keywords that are functions:
> 
> $ perl -e 'print: goto print'
> Can't find label 1 at -e line 1.

Darn.  Looks like the already-committed complete ban on keyword labels is
the sanest option.  Fortunately we do have C<use VERSION> to limit any
collateral damage from new keywords.
-- 
Chip Salzenberg

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