Mike O'Regan
Mike O'Regan
Perl allows whitespace between a sigil and its identifier, but PPI doesn't support it. `@ foo` is the same as `@foo` and should parse as PPI::Token::Symbol, but doesn't: ``` $...
PPI::Token::Magic and the Changes file explicitly make "$::|" a magic variable, but I haven't found a version of perl that will compile it: ``` perl -le 'say STDOUT $::|' syntax...
throw on existing PPI::Exception object does not add callers info unless callers already populated
If throw is called on the PPI::Exception class name, callers information is populated inside the object: ``` perl -MData::Dumper -WE 'use PPI::Exception; eval { PPI::Exception->throw() }; say Dumper $@->callers' $VAR1...
Regression between 1.220 and the pre-1.221 master: 1.220: ``` ppidump '$a->dat x 2;' PPI::Document PPI::Statement [ 1, 1, 1 ] PPI::Token::Symbol '$a' [ 1, 3, 3 ] PPI::Token::Operator '->' [...
perldoc -f qw explains that if qw is followed by whitespace plus '#', the rest of the line is a comment, and the qw's opening delimiter will be taken from...
``` ppidump 'open( my $fh, ">", $filename );' PPI::Document PPI::Statement [ 1, 1, 1 ] PPI::Token::Word 'open' PPI::Structure::List ( ... ) PPI::Statement::Variable [ 1, 7, 7 ] PPI::Token::Word 'my' [...
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'...
https://github.com/Perl-Critic/Perl-Critic/issues/500 is not happy with this "-1" parsing as a number rather than the operator '-' followed by the number 1: ``` ppidump '(1)-1' PPI::Document PPI::Statement PPI::Structure::List ( ... )...
from https://github.com/Perl-Critic/Perl-Critic/issues/192 , hash constructor parses as a code block ``` ppidump '0 || {b => 1, a => 1};' PPI::Document PPI::Statement [ 1, 1, 1 ] PPI::Token::Number '0' [...
The "Gory details of parsing quoted constructs" of perlop explicitly mentions that backslashes are legal qw delimiters, e.g. "qw\a b c\". PPI gets it right unless there is nothing inside...