PPI
PPI copied to clipboard
whitespace not allowed between sigil and identifier
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:
$ ppidump '@ foo'
PPI::Document
PPI::Statement
[ 1, 1, 1 ] PPI::Token::Cast '@'
[ 1, 3, 3 ] PPI::Token::Word 'foo'
There was a reason for this. I think I was trying to avoid the problem of dealing with the whitespace by treating it kind of like a fake soft reference. I.E. @{foo}
I felt at the time that the space was such a strange case that it wasn't worth supporting, and I don't recall encountering it more than once or twice ever in the wild.
A tinderbox search run over CPAN would confirm if anyone ever uses it.
Adam On Dec 31, 2014 5:18 PM, "moregan" [email protected] wrote:
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:
$ ppidump '@ foo' PPI::Document PPI::Statement [ 1, 1, 1 ] PPI::Token::Cast '@' [ 1, 3, 3 ] PPI::Token::Word 'foo'
— Reply to this email directly or view it on GitHub https://github.com/adamkennedy/PPI/issues/158.
Had to go to backpan to find PPI::Tinderbox, and the latest there is 0.08. Was that the last release (January 2005)?
Probably. There are other modern equivalents, I think dagolden has a cpan scanner and then I wrote a derivative of it. So it might have a different name On Jan 1, 2015 5:54 AM, "moregan" [email protected] wrote:
Had to go to backpan to find PPI::Tinderbox, and the latest there is 0.08. Was that the last release (January 2005)?
— Reply to this email directly or view it on GitHub https://github.com/adamkennedy/PPI/issues/158#issuecomment-68461760.