Subject: | False positive for ValuesAndExpressions::ProhibitCommaSeparatedStatements |
Date: | Mon, 20 Jul 2009 17:41:07 -0400 |
To: | bug-Perl-Critic [...] rt.cpan.org |
From: | Packy Anderson <packyanderson [...] gmail.com> |
I've found another false positive:
package main;
use strict;
use warnings;
sub func {}
my %hash;
func( { %hash, bar => 2 } );
1;
Because the direct parent of the code containing the comma parses out
to be a PPI::Structure::Block, it's mistakenly flagging the hashref as
violating this policy.
I've actually worked up a patch that I think fixes this, but I wanted
to open a ticket for it first so I could reference it in my patch to
the ProhibitCommaSeparatedStatements.run file.
Thanks,
-packy
--
Packy Anderson
Email: PackyAnderson@gmail.com