Hi there,
I have tried to fix our HTML::Template in November which is blocked by
Rakudo segaful.
I was trying to create simple example, but can`t reproduce it. By the
way now I have short
example(much shorter then when I start), and I have questions about it:
grammar G {
token TOP { ^ foo+ $ };
token foo { ':' bar? };
token bar { \w };
};
:a:b ~~ G::TOP;
say ~$/foobar; #:a
# why ':a'? why not just 'a'?
for $/foo - $c {
say ~$cbar; #1\n1
# look like $cbar array here
}
When I remove '?' in foo token:
say ~$/foobar; #:a
# still
for $/foo - $c {
say ~$cbar; #a\nb
# '?' change match object data structure? Looks very strange for
my, but mb I just missed something in spec.
}
Segaful was occurred when we use something like that:
for $/foo - $c {
baz(~$cbar);
}
baz ($str) {
my $lstr = $str.lc;
return 'Something' if $lstr eq 'none'; # segaful there, but it do
not reproduce on that simple code, I will dig and mb found additional
data about.
}
If someone interesting to see real code with segaful, look at
http://github.com/viklund/november/tree/new-html-template
Thank you!