PPI icon indicating copy to clipboard operation
PPI copied to clipboard

RT 75921: match on implicit $_ after map/grep not recogized

Open moregan opened this issue 10 years ago • 2 comments

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/'

moregan avatar Mar 16 '14 14:03 moregan

I believe this is still an issue with PPI 1.220.

epa avatar Dec 31 '14 13:12 epa

I believe this is still an issue with PPI 1.236.

epa avatar Aug 14 '17 16:08 epa