Rakudo v2031.03 ????

Have I been asleep for a decade?

My Rakudo is v2021.12.

I'm not sure what context you are using, so why you are getting errors. POD6 commands do not work with REPL.

Here is the contents of a test file, which can be run with 'prove6 -v t/config.t' assuming the following are in 't/config.t'

The first three tests are in the Roast test suite and have been passing for years. I'm not aware they fail with any version of Rakudo.

The =defn test is related to my earlier email and shows that Definition lists cannot contain embedded POD6.


use Test;
plan 8;
my $p = 0;
my $r;

=begin pod =for DESCRIPTION :title<presentation template> = :author<John Brown> :pubdate(2011) =end pod $r = $=pod[$p++].contents[0];
is $r.config<title>, 'presentation template';
is $r.config<author>, 'John Brown';
is $r.config<pubdate>, 2011;

=begin pod =for head1 :attr('key') :battr<key2> This is a working header =for head1 = :attr('key') :battr<key2> This is what is being tested =defn Bad boy When you B<try>to include formating. Outside a definition list B<formating>is treated differently. =end pod $r = $=pod[$p++];

is $r.contents[0].config<attr>, 'key', "'attr' is found in first header config";
is $r.contents[1].config<attr>, 'key', "'attr' is found in second header 
config";
isa-ok $r.contents[2], Pod::Defn, 'third item is a definition list';
isa-ok $r.contents[3].contents[1], Pod::FormattingCode, 'Ordinary paragraph 
contents has a Formatting Code';
todo 1;
isa-ok $r.contents[2].contents[1], Pod::FormattingCode, 'Definition contents 
has a Formatting Code';

done-testing;

Regards

Richard

On 02/01/2022 23:00, Ralph Mellor wrote:
On Sun, Jan 2, 2022 at 8:00 PM Richard Hainsworth
<rnhainswo...@gmail.com> wrote:
What does not work (in that 'newkey' is not found in the 'config' part
of the Pod::Block returned by $=pod

=head1 :key<value>

= :newkey<newvalue>
I just tried that with Rakudo v2031.03 and got a compile
time error for this line:

= :newkey<newvalue>

Preceding context expects a term, but found infix = instead.
Did you make a mistake in Pod syntax?

But this does work, and it is a passing test in the Roast suite

=head1 :key<value>

=           :newkey<newvalue>
For me I got the same error as above. This was so for anywhere from
zero to 10 spaces between the `=` and `:newkey<newvalue>`.

However, the intent of S26, as stated in the raku documentation, is for
the first variant above to work, and also for the following case

(this being what is intended as a virtual margin):

       =head1 :newkey<value>

       = :newkey<newvalue>
For me I got the same error (for the `      = :newkey<newvalue>` line).

But this does works (and it seems to be two virtual margins)

       =head1 :key<value>

       =           :newkey<newvalue>
Same error.

My results vs yours suggest someone has changed this behavior
between v2021.3 and your version.

Having looked at commits to Grammar.nqp since 2021.03 I don't
understand how that can be if you're using a later version.

I have looked at the grammar for this situation, which I think is at

https://github.com/finanalyst/rakudo/blob/ae2bf80dae74986c75f9a610f7a25cc1f6cdbb36/src/Perl6/Grammar.nqp#L5093
Blame suggests that code was.last affected (merely moved) 3 years ago:

https://github.com/finanalyst/rakudo/blame/ae2bf80dae74986c75f9a610f7a25cc1f6cdbb36/src/Perl6/Grammar.nqp#L5093

but I cannot see why the actual behaviour occurs, but the documented
(apparently intended) behaviour does not.
The behaviour change and blame suggests it's not due to that line.

----

Alternatively I am utterly confused.

Either way, happy new year. :)

--
love, ralph

Reply via email to