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

People
Owner: Nobody in particular
Requestors: wyant [...] cpan.org
Cc:
AdminCc:

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



Subject: Warning from $doc->index_locations() on empty document
Download (untitled) / with headers
text/plain 638b
If you do the following: perl -w -MPPI::Document -e 'my $doc = PPI::Document->new( \"" ); $doc->index_locations();' you get the following warning: Use of uninitialized value $first in foreach loop entry at /usr/local/perl/5.12.1/lib/site_perl/5.12.1/PPI/Document.pm line 620. You get the same error (plus some others) if for some reason you call index_locations() twice on the same document. Yes, this is mostly cosmetic. It turned up in a Perl::Critic test that was added to be sure that a uses_module() method would work in the case of a module without 'use' statements. A patch to both PPI::Document and t/03_document.t follows.
Proposed patch committed as SVN revision 12962.
Resolved in 2.214_01


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.