Login
RT #74429: 'Negative array index should be used' a little misleading
authorTom Wyant <harryfmudd@comcast.net>
Tue, 28 Feb 2012 02:53:09 +0000 (02:53 +0000)
committerTom Wyant <harryfmudd@comcast.net>
Tue, 28 Feb 2012 02:53:09 +0000 (02:53 +0000)
commit8913f8b8030d54aab88ded80c5ef755f7aed0816
tree8ab03f60f3d039da235ba75dadfdcbc4529a8129
parent9c63c5b91e8b35dfeadc45b512d4754fd0393019
RT #74429: 'Negative array index should be used' a little misleading

The problem was that the documentation of
Variables::RequireNegativeIndices did not mention at all the fact
the semantics of $#foo-$n change when $n becomes greater than $#foo,
whereas the semantics of -$n do not. The author of the ticket seems to
have been burned when trying to straighten out non-compliances.

The long explanation of a non-compliance has been revised to feature the
semantics change prominently.

The short explanation has not been changed, because I confess my
inability to do significantly better without taking significantly more
verbage.
lib/Perl/Critic/Policy/Variables/RequireNegativeIndices.pm