Mark Stern via RT wrote:
Show quoted text> The following code snippet produces a false positive:
[chop]
Show quoted text> my @list = keys %{{map { $_ => 1 } qw(a b a c)}};
This is a PPI parsing bug. The second curly gets parsed as a block and not a hash constructor.
PPI::Document
PPI::Statement::Variable
[ 1, 1, 1 ] PPI::Token::Word 'my'
[ 1, 4, 4 ] PPI::Token::Symbol '@list'
[ 1, 10, 10 ] PPI::Token::Operator '='
[ 1, 12, 12 ] PPI::Token::Word 'keys'
[ 1, 17, 17 ] PPI::Token::Cast '%'
PPI::Structure::Block { ... }
PPI::Statement::Compound
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 20, 20 ] PPI::Token::Word 'map'
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 26, 26 ] PPI::Token::Magic '$_'
[ 1, 29, 29 ] PPI::Token::Operator '=>'
[ 1, 32, 32 ] PPI::Token::Number '1'
[ 1, 36, 36 ] PPI::Token::QuoteLike::Words 'qw(a b a c)'
[ 1, 49, 49 ] PPI::Token::Structure ';'