2009/7/30 Jerry D. Hedden <jdhedden@cpan.org>: >> In perl.git, the branch blead has been updated >> >> <http://perl5.git.perl.org/perl.git/commitdiff/f71d6157c7933c0d3df645f0411d97d7e2b66b2f?hp=0409250f9c9eac87ff80d18e21856800e91763b5> >> >> - Log ----------------------------------------------------------------- >> commit f71d6157c7933c0d3df645f0411d97d7e2b66b2f >> Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com> >> Date: Tue Jul 28 09:47:24 2009 +0200 >> >> Forbid labels with keyword names > > Jerry D. Hedden wrote: >>> Interesting. This "broke" one of my CPAN modules. Wonder how many >>> others it will affect? > > Rafael Garcia-Suarez wrote: >> I guess that only demonstrates that one can never underestimate the >> importance of backwards compatibility. I would never have guessed I >> had such a report that fast. >> >> What was the code you used ? > > The construct was something like this: > > # Check on what we've found > CHECK: > foreach my $key (keys(%{$spec})) { > my $spec_item = $$spec{$key}; > # No specs to check > if (ref($spec_item) ne 'HASH') { > # The specifier entry was just 'key => regex'. If 'key' is not in > # the args, the we need to remove the 'undef' entry in the found > # args hash. > if (! defined($found{$key})) { > delete($found{$key}); > } > next CHECK; > } > > ... and more similar check ... > } > > I didn't think of the label as a keyword. I changed it to > CHECKIT to fix the problem. I suspect that you wont be the only one who get nailed by this. I suspect that INIT/CHECK are both likely to be common as labels (in sofar as labels go). Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next