# New Ticket Created by Vasily Chekalkin
# Please include the string: [perl #61136]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=61136 >
Hello.
Simple example
[EMAIL PROTECTED]:~/src/xquery$ cat m.pl
token a { 'a' };
token b { 'b' };
rule Foo { <a> | <b> };
'b' ~~ / <Foo> /;
given $/<Foo> {
when .<a> { say "a"; };
when .<b> { say "b"; };
};
[EMAIL PROTECTED]:~/src/xquery$ perl6 m.pl
Method 'ACCEPTS' not found for invocant of class 'PGE;Match'
<bacek> is it legal syntax?
or I always should use if/elsif/else?
<moritz_> bacek: yes, but until you match your regex you won't get any
meaningful result
<bacek> perl6: token a { 'a' }; token b { 'b' }; rule Foo { <a> | <b> };
'b'~~ / <Foo> /; given $/<Foo> { when .<a> { say "a"; }; when .<b> { say
"b"; }; };
<p6eval> rakudo 33630: OUTPUT[Method 'ACCEPTS' not found for invocant of
class 'PGE;Match'current instr.: 'infix:~~' pc 14429
(src/builtins/match.pir:18)]
..pugs: OUTPUT[Error eval perl5: "if
(!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) { unshift @INC,
'/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib'; unshift @INC,
'/home/evalenv/pugs/third-party/Parse-Yapp/lib'; eval q[require
'Pugs/Runtime/Match/HsBridge.pm'] or die $@;}'Pugs::Runti...
..elf 24206: OUTPUT[Can't locate object method "cb__RegexDef" via package
"EmitSimpleP5" at ./elf_f line 1612.]
<bacek> moritz_: thanks
looks like another TODO ticket for rakudo.
<moritz_> let me check the S03 smart match table first...
yes, Any .foo - method truth
--
Best regards
Vasily Chekalkin