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

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

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



Subject: return { foo => 1 } should parse curlys as hash constructor, not block
Download (untitled) / with headers
text/plain 704b
The perlref documentation says (under "3. A reference to an anonymous hash can be created using curly brackets:" that placing a "return" in front of the curly brackets tells Perl that the curly brackets do not represent a block. The subsequent examples seem to make it clear that this is a roundabout way of saying that in "return { ... }" the curly brackets are interpreted as a hash constructor. Pretty much the same verbiage is in perlref in 5.6.2, 5.12.2, and 5.13.4. But PPI interprets these as a block. A patch for this is in preparation, basically repeating the logic that causes +{...} to be treated as a hash constructor, SVN commit 8963. I will update this ticket when the patch is committed.
Download (untitled) / with headers
text/plain 103b
The patch has been committed as SVN revision 13061. FWIW, this is related to Perl::Critic ticket 61301.
Resolved in 1.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.