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: 36555
Status: open
Priority: 0/
Queue: PPI

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: "require" in expression parse as PPI::Statement::Include
Date: Sun, 08 Jun 2008 08:23:50 +1000
To: bug-PPI [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In ppi 1.203 and the debian packaged perl 5.10 a line eval { require IO::Socket::INET } || require IO::Socket; parses as PPI::Document PPI::Statement PPI::Token::Word 'eval' PPI::Structure::Block { ... } PPI::Statement::Include PPI::Token::Word 'require' PPI::Token::Word 'Foo' PPI::Token::Operator '||' PPI::Token::Word 'require' PPI::Token::Word 'Bar' PPI::Token::Structure ';' where I expected the second "require" would be PPI::Statement::Include, the same as the first. Dunno if a require in an expression is a good idea, this one is from Net::HTTP (in LWP).
Subject: Re: [rt.cpan.org #36555] "require" in expression parse as PPI::Statement::Include
Date: Mon, 9 Jun 2008 11:33:23 +1000
To: bug-PPI [...] rt.cpan.org
From: "Adam Kennedy" <adamkennedybackup [...] gmail.com>
In the first case, the require is the statement ( there is a statement inside of any block). In the second case, it is not a statement, just some tokens tacked on the end of another statement. While perhaps not ideal, what you see is about as accurate as we can get. Adam K 2008/6/8 Kevin Ryde via RT <bug-PPI@rt.cpan.org>: Show quoted text
> Sat Jun 07 18:24:39 2008: Request 36555 was acted upon. > Transaction: Ticket created by user42@zip.com.au > Queue: PPI > Subject: "require" in expression parse as PPI::Statement::Include > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: user42@zip.com.au > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=36555 > > > > In ppi 1.203 and the debian packaged perl 5.10 a line > > eval { require IO::Socket::INET } || require IO::Socket; > > parses as > > PPI::Document > PPI::Statement > PPI::Token::Word 'eval' > PPI::Structure::Block { ... } > PPI::Statement::Include > PPI::Token::Word 'require' > PPI::Token::Word 'Foo' > PPI::Token::Operator '||' > PPI::Token::Word 'require' > PPI::Token::Word 'Bar' > PPI::Token::Structure ';' > > where I expected the second "require" would be PPI::Statement::Include, > the same as the first. > > Dunno if a require in an expression is a good idea, this one is from > Net::HTTP (in LWP). > >