PPI
PPI copied to clipboard
RT 30037: minus operator turns function name into two words
https://rt.cpan.org/Ticket/Display.html?id=30037 With PPI 1.215:
ppidump '$a=-xx::cc()'
PPI::Document
PPI::Statement
[ 1, 1, 1 ] PPI::Token::Symbol '$a'
[ 1, 3, 3 ] PPI::Token::Operator '='
[ 1, 4, 4 ] PPI::Token::Word '-xx'
[ 1, 7, 7 ] PPI::Token::Word '::cc'
PPI::Structure::List ( ... )
Without the minus you get what you'd expect:
ppidump '$a=xx::cc()'
PPI::Document
PPI::Statement
[ 1, 1, 1 ] PPI::Token::Symbol '$a'
[ 1, 3, 3 ] PPI::Token::Operator '='
[ 1, 4, 4 ] PPI::Token::Word 'xx::cc'
PPI::Structure::List ( ... )
See also https://rt.cpan.org/Public/Bug/Display.html?id=55749, which has a lot of analysis and sample Perl code