2009/7/30 Chip Salzenberg <chip@pobox.com>: > 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. Yes, that's what seemed to me too. I've now checked in an error message improvement as suggested by Jerry. $ bleadperl -Esay: Can't use keyword 'say' as a label at -e line 1. You will note that "bleadperl -esay:" doesn't produce an error. Only current keywords are checked.Thread Previous | Thread Next