Skip Menu |
Report information
Id: 126651
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: autarch <autarch [at] urth.org>
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



To: rakudobug [...] perl.org
From: Dave Rolsky <autarch [...] urth.org>
Date: Sun, 15 Nov 2015 13:58:32 -0600 (CST)
Subject: Compiler does not parse POD =defn block correctly
Download (untitled) / with headers
text/plain 576b
Show quoted text
> perl6 --version
This is perl6 version 2015.10-220-g4988c70 built on MoarVM version 2015.10-61-g624d504 Given this code: =begin pod =defn Item Definition =end pod dd $=pod; I note that the "Item" text is gone entirely. It looks like the parser is not saving that for some reason. Cheers, -dave /*============================================================ http://VegGuide.org http://blog.urth.org Your guide to all that's veg House Absolute(ly Pointless) ============================================================*/
Download (untitled) / with headers
text/plain 286b
Show quoted text
> I note that the "Item" text is gone entirely. It looks like the parser is > not saving that for some reason.
Actually, looking more close, it's not gone, it's simply indistinguishable from the next line. This means that there's no way to tell the item text from the definition text.
Download (untitled) / with headers
text/plain 758b
What I did ... run this code: =begin pod =defn Item Definition =end pod dd $=pod; What I got: Array $var = $[Pod::Block::Named.new(name => "pod", config => {}, contents => [Pod::Block::Named.new(name => "defn", config => {}, contents => [Pod::Block::Para.new(config => {}, contents => ["Item Definition"])])])] What I expected: I'd expect the text on the "=defn" line to be distinguished from the text on the next line (item vs definition). The simplest way would be to simply make the Named block's contents attribute contain multiple items. However, a better fix IMO would be to introduce a new class, Pod::Block::Defn, with an additional attribute like "term" or "item", and then contents would just contain the next line.


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

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org