On Fri, Nov 07, 2008 at 11:21:32PM -0800, Chris Dolan wrote: > # New Ticket Created by Chris Dolan > # Please include the string: [perl #60400] > # in the subject line of all future correspondence about this issue. > # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=60400 > > > > Test case #1: > ./perl6 -e'class Foo::Bar {}; say Foo::Bar.new.WHAT' > Got: > Bar > Expected: > Foo::Bar
Rakudo has the correct behavior here -- .WHAT stringifies to the short name. From Synopsis 12, "Introspection": Metamethods for objects are named with interrogative pronouns in uppercase: WHAT the prototype object of the type, stringifies to short name WHICH the object's identity value WHO the package supporting the object, stringifies to long name ... > Test case #2 (which is just a special case of test case #1): > ./perl6 -e'class Foo::Bar {}; say Foo::Bar.new' > Got: > Bar<0x4099e80> > Expected: > Foo::Bar<0x4099e80> There might be an argument that we should use .WHO for default stringification -- but (1) we don't have an implementation of .WHO yet, and (2) much of this is speculative anyway since there aren't any specifications or tests for this behavior. Thus I'm inclined to leave things as they are for now. Thanks! Pm