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

Owner: Nobody
Requestors: lloyd.fourn [at] gmail.com
rob [at] hoelz.ro
teodozjan <teodozjan [at] gmail.com>
Cc:
AdminCc:

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



Subject: [POD] Formatting codes does not work inside declarator blocks
Download (untitled) / with headers
text/plain 483b
Examples in spec http://design.perl6.org/S26.html#Declarator_blocks contain formatting codes so I assume it is valid as in any other vlock use v6; #| aaaa class Foo{ #=[ B<bar> ] has $.a; } output: perl6 --doc /tmp/tst.pl6 class Foo aaaa B<bar> expected: perl6 --doc /tmp/tst.pl6 class Foo aaaa bar This is perl6 version 2015.10-323-gb18ada0 built on MoarVM version 2015.10-92-g0181385
To: "rakudobug [...] perl.org" <rakudobug [...] perl.org>
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Date: Fri, 18 Dec 2015 03:33:39 +0000
Subject: [POD] declarator blocks don't parse contents as POD
Download (untitled) / with headers
text/plain 103b
#| look it's a C<thing>!
sub thing { ... }

say &thing.WHY.contents.perl;

#-> ["look its a C<thing>"]

Subject: Re: [perl #126954] [POD] declarator blocks don't parse contents as POD
Date: Fri, 18 Dec 2015 11:48:27 +0100
To: "Lloyd Fournier (via RT)" <perl6-bugs-followup [...] perl.org>
From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
Download (untitled) / with headers
text/plain 800b
Show quoted text
> On 18 Dec 2015, at 04:34, Lloyd Fournier (via RT) <perl6-bugs-followup@perl.org> wrote: > > # New Ticket Created by Lloyd Fournier > # Please include the string: [perl #126954] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=126954 > > > > #| look it's a C<thing>! > sub thing { ... } > > say &thing.WHY.contents.perl; > > #-> ["look its a C<thing>"]
Feels like ENOTABUG to me. What does “parse as POD” even mean in this context? It’s a string that *could* be interpreted as pod. But it’s still just a Str. It’s entirely up to you what you do with it. Standard tools will use it *as* pod, yes. But at the .WHY level, it’s just a Str. Well, anyway, that’s my interpretation of it :-) Liz
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
To: perl6-bugs-followup [...] perl.org
Subject: Re: [perl #126954] [POD] declarator blocks don't parse contents as POD
Date: Fri, 18 Dec 2015 11:24:34 +0000
Download (untitled) / with headers
text/plain 1.1k
Hey Liz,

The thing is that it seems that it isn't pod at any level. It simply isn't parsed as pod. I'm out atm but when I was looking at it it was just parsed as a quoted string and shoved into Pod::Block::Declarator.

I would love to be wrong :)

LL


On Fri, 18 Dec 2015 at 9:49 PM, Elizabeth Mattijsen via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
> On 18 Dec 2015, at 04:34, Lloyd Fournier (via RT) <perl6-bugs-followup@perl.org> wrote:
>
> # New Ticket Created by  Lloyd Fournier
> # Please include the string:  [perl #126954]
> # in the subject line of all future correspondence about this issue.
> # <URL: https://rt.perl.org/Ticket/Display.html?id=126954 >
>
>
> #| look it's a C<thing>!
> sub thing { ... }
>
> say &thing.WHY.contents.perl;
>
> #-> ["look its a C<thing>"]

Feels like ENOTABUG to me.

What does “parse as POD” even mean in this context?  It’s a string that *could* be interpreted as pod.  But it’s still just a Str.  It’s entirely up to you what you do with it.  Standard tools will use it *as* pod, yes.  But at the .WHY level, it’s just a Str.


Well, anyway, that’s my interpretation of it :-)



Liz

From: Elizabeth Mattijsen <liz [...] dijkmat.nl>
To: "Lloyd Fournier (via RT)" <perl6-bugs-followup [...] perl.org>
Date: Fri, 18 Dec 2015 13:02:57 +0100
Subject: Re: [perl #126954] [POD] declarator blocks don't parse contents as POD
Download (untitled) / with headers
text/plain 1.4k
I was completely wrong in assuming that .WHY returned a Str. So this probably is a bug, but for someone else to fix, as I’m a complete pod 6 noob. Liz ============== Show quoted text
> On 18 Dec 2015, at 12:24, Lloyd Fournier <lloyd.fourn@gmail.com> wrote: > > Hey Liz, > > The thing is that it seems that it isn't pod at any level. It simply isn't parsed as pod. I'm out atm but when I was looking at it it was just parsed as a quoted string and shoved into Pod::Block::Declarator. > > I would love to be wrong :) > > LL > > > On Fri, 18 Dec 2015 at 9:49 PM, Elizabeth Mattijsen via RT <perl6-bugs-followup@perl.org> wrote:
> > On 18 Dec 2015, at 04:34, Lloyd Fournier (via RT) <perl6-bugs-followup@perl.org> wrote: > > > > # New Ticket Created by Lloyd Fournier > > # Please include the string: [perl #126954] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org/Ticket/Display.html?id=126954 > > > > > > > #| look it's a C<thing>! > > sub thing { ... } > > > > say &thing.WHY.contents.perl; > > > > #-> ["look its a C<thing>"]
> > Feels like ENOTABUG to me. > > What does “parse as POD” even mean in this context? It’s a string that *could* be interpreted as pod. But it’s still just a Str. It’s entirely up to you what you do with it. Standard tools will use it *as* pod, yes. But at the .WHY level, it’s just a Str. > > > Well, anyway, that’s my interpretation of it :-) > > > > Liz >
To: perl6-bugs-followup [...] perl.org
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Subject: Re: [perl #126954] [POD] declarator blocks don't parse contents as POD
Date: Mon, 21 Dec 2015 09:40:03 +0000
Download (untitled) / with headers
text/plain 217b
That is caused by the same thing. Thanks!

On Sun, 20 Dec 2015 at 4:20 AM, Kamil Kułaga via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
Subject: Using POD directives in declarative blocks (like I<...>) doesn't work
For example: #| Here I<I> am sub foo() {} say(&foo.WHY.Str); # Here I<I> am
Date: Sun, 17 Jan 2016 04:36:10 +0000
Subject: Re: [perl #127294] Using POD directives in declarative blocks (like I<...>) doesn't work
To: perl6-compiler [...] perl.org, bugs-bitbucket [...] rt.perl.org
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
Download (untitled) / with headers
text/plain 717b
There are now three of these XD. 


FYI this is really difficult to implement with pod in its present state. 
IMO We need POD as another language approach to do this properly:

On Sun, Jan 17, 2016 at 2:25 PM Rob Hoelz <perl6-bugs-followup@perl.org> wrote:
Show quoted text
# New Ticket Created by  Rob Hoelz
# Please include the string:  [perl #127294]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127294 >


For example:

#| Here I<I> am
sub foo() {}

say(&foo.WHY.Str); # Here I<I> am
I haven't looked at SUPERNOVA much, but I think this should actually be pretty simple to fix. The comment:sym<#|> token and friends need to be updated to use the pod_content rule. If I have enough time this week, I may end up doing this. On 2016-01-16 20:36:48, lloyd.fourn@gmail.com wrote: Show quoted text
> There are now three of these XD. > > https://rt.perl.org/Public/Bug/Display.html?id=126954 > https://rt.perl.org/Public/Bug/Display.html?id=126654 > > FYI this is really difficult to implement with pod in its present state. > IMO We need POD as another language approach to do this properly: > https://github.com/ShimmerFairy/SUPERNOVA > > On Sun, Jan 17, 2016 at 2:25 PM Rob Hoelz <perl6-bugs-followup@perl.org> > wrote: >
> > # New Ticket Created by Rob Hoelz > > # Please include the string: [perl #127294] > > # in the subject line of all future correspondence about this issue. > > # <URL: https://rt.perl.org/Ticket/Display.html?id=127294 > > > > > > > For example: > > > > #| Here I<I> am > > sub foo() {} > > > > say(&foo.WHY.Str); # Here I<I> am > >
From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
To: perl6-bugs-followup [...] perl.org, teodozjan [...] gmail.com
Subject: Re: [perl #126654] [POD] Formatting codes does not work inside declarator blocks
Date: Sun, 17 Jan 2016 05:58:45 +0000
Download (untitled) / with headers
text/plain 1.5k
I have also been down this path. The one line version is doable as you suggested but the #|{ .... } version is harder because you need to nibble in a sublanguage or do manual balanced text processing, which is why the original author never implemented it I'm guessing.

The trick is getting:
#|{
 docs for sub { } are in here
to parse properly. I would love it if you could do it!


On Sun, Jan 17, 2016 at 4:52 PM Rob Hoelz via RT <perl6-bugs-followup@perl.org> wrote:
Show quoted text
I haven't looked at SUPERNOVA much, but I think this should actually be pretty simple to fix.  The comment:sym<#|> token and friends need to be updated to use the pod_content rule.  If I have enough time this week, I may end up doing this.

On 2016-01-16 20:36:48, lloyd.fourn@gmail.com wrote:
> There are now three of these XD.
>
> https://rt.perl.org/Public/Bug/Display.html?id=126954
> https://rt.perl.org/Public/Bug/Display.html?id=126654
>
> FYI this is really difficult to implement with pod in its present state.
> IMO We need POD as another language approach to do this properly:
> https://github.com/ShimmerFairy/SUPERNOVA
>
> On Sun, Jan 17, 2016 at 2:25 PM Rob Hoelz <perl6-bugs-followup@perl.org>
> wrote:
>
> > # New Ticket Created by  Rob Hoelz
> > # Please include the string:  [perl #127294]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=127294 >
> >
> >
> > For example:
> >
> > #| Here I<I> am
> > sub foo() {}
> >
> > say(&foo.WHY.Str); # Here I<I> am
> >



From: Lloyd Fournier <lloyd.fourn [...] gmail.com>
To: perl6-bugs-followup [...] perl.org, teodozjan [...] gmail.com
Date: Sun, 17 Jan 2016 06:01:14 +0000
Subject: Re: [perl #126654] [POD] Formatting codes does not work inside declarator blocks
Download (untitled) / with headers
text/plain 1.9k
Forgot, the tricky one is really:

#|{ docs for sub { } are in here }  sub foo { }

^^ That should be fine and parses properly now. IMO just making the one line work is also acceptable for now I'd say if you can't achieve both.

On Sun, Jan 17, 2016 at 4:58 PM Lloyd Fournier <lloyd.fourn@gmail.com> wrote:
Show quoted text
I have also been down this path. The one line version is doable as you suggested but the #|{ .... } version is harder because you need to nibble in a sublanguage or do manual balanced text processing, which is why the original author never implemented it I'm guessing.

The trick is getting:
#|{
 docs for sub { } are in here
to parse properly. I would love it if you could do it!


On Sun, Jan 17, 2016 at 4:52 PM Rob Hoelz via RT <perl6-bugs-followup@perl.org> wrote:
I haven't looked at SUPERNOVA much, but I think this should actually be pretty simple to fix.  The comment:sym<#|> token and friends need to be updated to use the pod_content rule.  If I have enough time this week, I may end up doing this.

On 2016-01-16 20:36:48, lloyd.fourn@gmail.com wrote:
> There are now three of these XD.
>
> https://rt.perl.org/Public/Bug/Display.html?id=126954
> https://rt.perl.org/Public/Bug/Display.html?id=126654
>
> FYI this is really difficult to implement with pod in its present state.
> IMO We need POD as another language approach to do this properly:
> https://github.com/ShimmerFairy/SUPERNOVA
>
> On Sun, Jan 17, 2016 at 2:25 PM Rob Hoelz <perl6-bugs-followup@perl.org>
> wrote:
>
> > # New Ticket Created by  Rob Hoelz
> > # Please include the string:  [perl #127294]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org/Ticket/Display.html?id=127294 >
> >
> >
> > For example:
> >
> > #| Here I<I> am
> > sub foo() {}
> >
> > say(&foo.WHY.Str); # Here I<I> am
> >





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