Kevin,
You've got a valid point -- that really is a false positive -- but,
man, the arrow notation is *so* much more readable... I consider
myself an expert, but I had to read that example sub several times to
figure out what it's doing.
Chris
On Jul 15, 2008, at 9:41 PM, Kevin Phair via RT wrote:
Show quoted text> Tue Jul 15 22:40:47 2008: Request 37713 was acted upon.
> Transaction: Ticket created by kevin@nyi.net
> Queue: Perl-Critic
> Subject: RequireArgUnpacking triggered in grep block
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: kevin@nyi.net
> Status: new
> Ticket <URL:
http://rt.cpan.org/Ticket/Display.html?id=37713 >
>
>
> example:
>
> sub example {
> my %hash = (
> a => 1,
> b => 2,
> );
>
> my @aoa = ( [ 10, 'a' ], [ 20, 'b' ], [ 30, 'c' ] );
>
> @aoa = grep { $hash{ $$_[1] } } @aoa;
> return \@aoa;
>
> }
>
> Using 'little-arrow' dereferencing syntax avoids triggering the
> unpacked
> args error.
>