This issue should now be fixed in r32597 so that PGE::Match objects
correctly return an ObjectRef and assigns properly into scalar types.

Also, in order to help diagnose such issues in the future, I've added a
.PARROT method to rakudo that can be used to better diagnose what is
happening internally when difficulties arise.  This should be a more
reliable indicator than trying to use .WHAT, which often hides such
differences.  For example

    $ ./parrot perl6.pbc
    > my $a = 'foo' ~~ /./;  say $a.WHAT; say $a.PARROT;
    Match
    ObjectRef->PGE;Match
    > my $a = 'foo' ~~ /./;  say (~$a).WHAT;  say (~$a).PARROT;
    Str
    String

Here we can see that even though .WHAT returns the expected Perl 6
protoobject, .PARROT shows us what is really happening beneath the surface.

I expect that most of the remaining discrepancies will resolve
themselves when we get HLL mapping in place.

Resolving ticket, thanks!

Pm


Reply via email to