# New Ticket Created by  Ilya Belikin 
# Please include the string:  [perl #60456]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60456 >


grammar G {
    token TOP { ':' <foo>+ };
    token foo { \d };
}

my $a = ":123" ~~ G::TOP;
say +$/; # 0 But match success. :(
say +$a; # 1

say $/.WHAT; # Match
say $a.WHAT; # Hash (!?)

# Hash, hmmm. I expect Match object.

say $/.perl; # {"foo" => [{}, {}, {}]}
say $a.perl; # {"foo" => [{}, {}, {}]}

# Strange hash

say $/<foo>.WHAT; # List
say $a<foo>.WHAT; # List

Reply via email to