develooper Front page | perl.perl6.internals | Postings from May 2008

Re: [perl #53750] [BUG] The WHAT method of Protobject returns only the last component of the name

Thread Previous | Thread Next
From:
Patrick R. Michaud
Date:
May 5, 2008 10:46
Subject:
Re: [perl #53750] [BUG] The WHAT method of Protobject returns only the last component of the name
On Mon, May 05, 2008 at 10:20:30AM -0700, Stephane Payrard wrote:
> The following PIR program prints "Match". I would expect "PGE::Match".
> I don't see the reason that motivates the current behavior
> 
> .sub main
>    .local pmc match
>    .local string s
>    load_bytecode "compilers/pge/PGE.pbc"
>    match = new "PGE::Match"
> #   trace 1
>    s = match.'WHAT'()
>    say s
> .end


S12 says that .WHAT stringifies to a short name, which is the reason
for the current behavior.

S12 also says that .WHO stringifies to the long name, which might be
what you expect.

So, perhaps we need to implement .WHO .  But that should probably
be done as part of Protoobject (which needs a bit of a refactor
anyway to make it even more Perl6ish).

Pm

Thread Previous | Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About