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:
demerphq
Date:
July 30, 2009 10:01
Subject:
Re: "Keyword" labels now forbidden (was [perl.git] branch blead, updated. GitLive-blead-1705-gf71d615)
Message ID:
9b18b3110907301001p7207f6a1uf3e9702dceba1227@mail.gmail.com
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


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