Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the PPI CPAN distribution.

Report information
The Basics
Id: 37892
Status: resolved
Priority: 0/
Queue: PPI

Owner: Nobody in particular
Requestors: user42 [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: parse "A"x6 as x operator
Date: Thu, 24 Jul 2008 12:01:40 +1000
To: bug-PPI [...]
From: Kevin Ryde <user42 [...]>
Download (untitled) / with headers
text/plain 657b
Running ppidump 'print 123,("A")x6' gives PPI::Document PPI::Statement PPI::Token::Word 'print' PPI::Token::Number '123' PPI::Token::Operator ',' PPI::Structure::List ( ... ) PPI::Statement::Expression PPI::Token::Quote::Double '"A"' PPI::Token::Word 'x6' where I hoped the "x" would be a PPI:Token::Operator, which is how I believe it runs, eg. perl -e 'print 123,("A")x6' prints 123AAAAAA (Of course I can imagine hairy stuff goes on between what's a word and what's an "x" operator, so maybe this example is a bit ambiguous.)
Download (untitled) / with headers
text/plain 245b
PPI already correctly handles "A"x6, as in your report summary. But the braces probably make it just a teensy bit insane... foo(...)x600 Then again, this MIGHT be possible... leaving open for now. I need to think about this one for a while.
Download (untitled) / with headers
text/plain 161b
With the latest release of PPI the x in that code is now parsed as operator. Please let me know if you have further issues. :)

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to