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: 13454
Status: resolved
Worked: 1.1 hours (65 min)
Priority: 0/
Queue: PPI

Owner: adamk [...]
Requestors: perl [...]

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

Subject: PPI infinite loops
Download (untitled) / with headers
text/plain 508b
Given this one-liner an infinite loop is produced: perl -MPPI::Document -le 'my $d = PPI::Document->new(\q[package foo; { sub bar { } }]); my $s = $d->find(q[Statement::Sub])->[0]; $s = $s->sprevious_sibling || $s->parent while $s and ref($s) !~ /Statement::Package/; print "package is: ", $s->namespace' The trouble is in the ' || $s->parent' which seems to be the cause of the problem. I'm pretty sure it's something to do with the parent() method as I've had similiar problems before. Dan aka broquaint

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

Please report any issues with to