New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
first draft implementation self.WHO to return package of a class #402
Comments
From @chrisdolanThe attached patch attempts to implement the WHO method from S12. % ../../parrot perl6.pbc -e'class Foo::Bar {}; say Foo::Bar.new.WHO;' % ../../parrot perl6.pbc -e'class Foo::Bar {}; say However, this implementation has the following flaws: |
From @chrisdolanwho.patchIndex: languages/perl6/src/classes/Object.pir
===================================================================
--- languages/perl6/src/classes/Object.pir (revision 32442)
+++ languages/perl6/src/classes/Object.pir (working copy)
@@ -405,6 +405,20 @@
.return self.'WHERE'()
.end
+=item WHO
+
+Gets the object's package
+
+=cut
+
+.sub 'WHO' :method
+ .local pmc p6meta, class, ns
+ p6meta = get_hll_global ['Perl6Object'], '$!P6META'
+ class = p6meta.'get_parrotclass'(self)
+ ns = class.'get_namespace'()
+ .return (ns)
+.end
+
=back
=head2 Private methods
|
From @jnthnWhen this patch is applied/WHO is implemented, we should also do an |
From @moritzWe have a .HOW method on all object these days, so I hope nobody |
@moritz - Status changed from 'new' to 'resolved' |
Migrated from rt.perl.org#60446 (status was 'resolved')
Searchable as RT60446$
The text was updated successfully, but these errors were encountered: