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: 19614
Status: resolved
Priority: 0/
Queue: PPI

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

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

Subject: Suspicious code in PPI::Structure
Download (untitled) / with headers
text/plain 579b
In the elements() method of PPI::Structure, there's a suspicious repeated block of code that looks like a copy-and-paste error. The following repeats $self->{start} twice: # Return the number of elements in scalar context. # This is memory-cheaper than creating another big array return scalar(@{$self->{children}}) + ($self->{start} ? 1 : 0) + ($self->{start} ? 1 : 0); Either the second was meant to be $self->{finish} or the two terms can be reduced to "$self->{start} ? 2 : 0"
Download (untitled) / with headers
text/plain 194b
Yep, typo. Fixed, and will appear in 1.15. If you would like commit on PPI so you can fix small bugs like this yourself in future, email me (adamk at cpan dot org) and I'll set you up with it.

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

Please report any issues with to