Login
RT #79138: RequireArgUnpacking confused by @_ in finally{}
authorTom Wyant <harryfmudd@comcast.net>
Fri, 24 Aug 2012 03:22:08 +0000 (03:22 +0000)
committerTom Wyant <harryfmudd@comcast.net>
Fri, 24 Aug 2012 03:22:08 +0000 (03:22 +0000)
commitb27093ede5b9b427ed8f1513f7ad6f74c3979f82
tree17a4a55ba17b558f06aa16ac704e3cb27ef5ac33
parentfb7e6d8a4f864efa6278eb37c5d44da46d27ba8d
RT #79138: RequireArgUnpacking confused by @_ in finally{}

This policy contains some logic for testing the size of the argument
list -- basically allowing the combinations '$something == @_', '@_ ==
$something', '$something != @_, and '@_ != $something'.

My read on the ticket is that finally{} is not involved, but that the
requestor is asking for the size test logic to be more comprehensive.

This I have done, adding the other comparison operators, plus boolean
operators, plus logic to handle suffix conditionals.

The .run file has an added test, though the test does not cover the
Cartesian product of all the possibilities.
Changes
lib/Perl/Critic/Policy/Subroutines/RequireArgUnpacking.pm
t/Subroutines/RequireArgUnpacking.run