Skip Menu |
 
Report information
Id: 60446
Status: resolved
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: chris [at] chrisdolan.net
Cc:
AdminCc:

Severity: (no value)
Tag: Patch
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: [PATCH] first draft implementation self.WHO to return package of a class
Date: Sun, 9 Nov 2008 23:55:19 -0600
To: rakudobug [...] perl.org
From: Chris Dolan <chris [...] chrisdolan.net>
Download (untitled) / with headers
text/plain 563b
The attached patch attempts to implement the WHO method from S12. With this patch, I get the following output: % ../../parrot perl6.pbc -e'class Foo::Bar {}; say Foo::Bar.new.WHO;' Bar % ../../parrot perl6.pbc -e'class Foo::Bar {}; say Foo::Bar.new.WHO.WHAT;' Module However, this implementation has the following flaws: * the WHO package stringifies to the shortname, not the longname specified in S12. * The following identity test fails: % ../../parrot perl6.pbc -e'class Foo::Bar {}; say Foo::Bar.new.WHO === Foo::Bar' 0
Download who.patch
text/plain 587b

Message body is not shown because sender requested not to inline it.

Download (untitled) / with headers
text/plain 146b
When this patch is applied/WHO is implemented, we should also do an update to the .perl method in ProtoObject to use the value of .WHO, not .WHAT.
Download (untitled) / with headers
text/plain 100b
We have a .HOW method on all object these days, so I hope nobody complains when I close this ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org