Skip Menu |
Report information
Id: 127029
Status: open
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)



Subject: Pod link containing pod is misparsed in some cases
Download (untitled) / with headers
text/plain 378b
Here's an example: =begin pod L<It has pod|#Has C<pod>> =end pod dd $=pod[0]; The parser decides that the _first_ ">" ends the link, and that the second ">" is a piece of plain text, which is clearly wrong. Note that writing this as L<<...>> doesn't fix the problem. The parser does get this right if there is no explicit link text: =begin pod L<#Has C<pod>> =end pod
Subject: Re: [perl #127029] Pod link containing pod is misparsed in some cases
Date: Sat, 26 Dec 2015 03:11:28 +0000
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
To: perl6-compiler [...] perl.org, bugs-bitbucket [...] rt.perl.org
IMO it looks like both of them are wrong but for different reasons

=pod L<#Has C<pod>>
becomes
# Pod::FormattingCode.new(type => "L", meta => [], config => {}, contents => ["#Has ", Pod::FormattingCode.new(type => "C", meta => [], config => {}, contents => ["pod"]), ""])

The L<> formatting code without a '|' should not contain a C<> formatting code it should just be taken verbatim.


On Sat, Dec 26, 2015 at 9:12 AM Dave Rolsky <perl6-bugs-followup@perl.org> wrote:
Show quoted text
# New Ticket Created by  Dave Rolsky
# Please include the string:  [perl #127029]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127029 >


Here's an example:

=begin pod

L<It has pod|#Has C<pod>>

=end pod

dd $=pod[0];

The parser decides that the _first_ ">" ends the link, and that the second ">" is a piece of plain text, which is clearly wrong.

Note that writing this as L<<...>> doesn't fix the problem.

The parser does get this right if there is no explicit link text:

=begin pod

L<#Has C<pod>>

=end pod
Download (untitled) / with headers
text/plain 840b
On Fri Dec 25 19:12:14 2015, lloyd.fourn@gmail.com wrote: Show quoted text
> IMO it looks like both of them are wrong but for different reasons > > =pod L<#Has C<pod>> > becomes > # Pod::FormattingCode.new(type => "L", meta => [], config => {}, contents > => ["#Has ", Pod::FormattingCode.new(type => "C", meta => [], config => {}, > contents => ["pod"]), ""]) > > The L<> formatting code without a '|' should not contain a C<> formatting > code it should just be taken verbatim.
I disagree. When L<> contains no '|' you're saying that this is the text you want shown for the link and the link itself as well. It seems like any text to be displayed should be treated as Pod, not something special. FWIW, it seems like in Perl 5 this does work more or less like that. The text inside "L<<test C<pod>>>" is treated as Pod, not parsed simply as plain text.


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