Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting codes does not work inside declarator blocks #4754

Open
p6rt opened this issue Nov 16, 2015 · 15 comments
Open

Formatting codes does not work inside declarator blocks #4754

p6rt opened this issue Nov 16, 2015 · 15 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 16, 2015

Migrated from rt.perl.org#126654 (status was 'new')

Searchable as RT126654$

@p6rt
Copy link
Author

p6rt commented Nov 16, 2015

From @teodozjan

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

@p6rt
Copy link
Author

p6rt commented Dec 18, 2015

From @LLFourn

#| look it's a C<thing>!
sub thing { ... }

say &thing.WHY.contents.perl;

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

@p6rt
Copy link
Author

p6rt commented Dec 18, 2015

From @lizmat

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-archive.perl.org/perl6/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

@p6rt
Copy link
Author

p6rt commented Dec 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Dec 18, 2015

From @LLFourn

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-archive.perl.org/perl6/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

@p6rt
Copy link
Author

p6rt commented Dec 18, 2015

From @lizmat

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

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-archive.perl.org/perl6/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

@p6rt
Copy link
Author

p6rt commented Dec 19, 2015

@p6rt
Copy link
Author

p6rt commented Dec 21, 2015

From @LLFourn

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​:

Not the same but similar
https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126654

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @hoelzro

For example​:

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

say(&foo.WHY.Str); # Here I<I> am

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @LLFourn

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-archive.perl.org/perl6/Ticket/Display.html?id=127294 >

For example​:

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

say(&foo.WHY.Str); # Here I<I> am

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @hoelzro

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-archive.perl.org/perl6/Ticket/Display.html?id=127294 >

For example​:

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

say(&foo.WHY.Str); # Here I<I> am

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @LLFourn

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-archive.perl.org/perl6/Ticket/Display.html?id=127294 >

For example​:

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

say(&foo.WHY.Str); # Here I<I> am

@p6rt
Copy link
Author

p6rt commented Jan 17, 2016

From @LLFourn

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​:

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-archive.perl.org/perl6/Ticket/Display.html?id=127294 >

For example​:

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

say(&foo.WHY.Str); # Here I<I> am

@p6rt p6rt added the POD label Jan 5, 2020
@JJ
Copy link

JJ commented Dec 30, 2020

I would say that this is similar to #2863 (maybe it's mentioned somewhere, since links don't work now...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants