Elliot Shank via RT wrote:
Show quoted text> seems to me that I have a false positive in the rule:
> Perl::Critic::Policy::ValuesAndExpressions::ProhibitCommaSeparatedStatements
>
> my ( $var1, $var2 ) = @{$message}{ 'var_1', 'var_2' };
>
> seems to don't understand the hash ref slice.
Actually, it's PPI that doesn't understand the slice.
PPI::Document
PPI::Statement::Variable
[ 1, 1, 1 ] PPI::Token::Word 'my'
PPI::Structure::List ( ... )
PPI::Statement::Expression
[ 1, 6, 6 ] PPI::Token::Symbol '$var1'
[ 1, 11, 11 ] PPI::Token::Operator ','
[ 1, 13, 13 ] PPI::Token::Symbol '$var2'
[ 1, 21, 21 ] PPI::Token::Operator '='
[ 1, 23, 23 ] PPI::Token::Cast '@'
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 25, 25 ] PPI::Token::Symbol '$message'
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 36, 36 ] PPI::Token::Word 'var_1'
[ 1, 41, 41 ] PPI::Token::Operator ','
[ 1, 43, 43 ] PPI::Token::Word 'var_2'
[ 1, 50, 50 ] PPI::Token::Structure ';'