PPI
PPI copied to clipboard
RT 75921: match on implicit $_ after map/grep not recogized
https://rt.cpan.org/Public/Bug/Display.html?id=75921
PPI 1.215 does not recognize a match against implicit $_ that follows map/grep if the match does not include 'm':
ppidump 'map { 0 } /z/'
PPI::Document
PPI::Statement
[ 1, 1, 1 ] PPI::Token::Word 'map'
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 7, 7 ] PPI::Token::Number '0'
[ 1, 11, 11 ] PPI::Token::Operator '/'
[ 1, 12, 12 ] PPI::Token::Word 'z'
[ 1, 13, 13 ] PPI::Token::Operator '/'
But with more information like 'm', it's fine:
ppidump 'map { 0 } m/z/'
PPI::Document
PPI::Statement
[ 1, 1, 1 ] PPI::Token::Word 'map'
PPI::Structure::Block { ... }
PPI::Statement
[ 1, 7, 7 ] PPI::Token::Number '0'
[ 1, 11, 11 ] PPI::Token::Regexp::Match 'm/z/'
I believe this is still an issue with PPI 1.220.
I believe this is still an issue with PPI 1.236.