Skip to content

Commit

Permalink
Joins meta, refs #3024
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Sep 14, 2019
1 parent a4cabe4 commit 3825edb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/Language/classtut.pod6
Expand Up @@ -127,7 +127,7 @@ use C<multi method new> if you do not want to disable the default constructor.
C<TWEAK> is the last submethod to be called, and it has the
advantage of having the object properties available without needing to
use the meta object protocol. It can be used, for instance, to assign
use the metaobject protocol. It can be used, for instance, to assign
values to instance variables based on the values of other attributes or
instance variables:
Expand Down Expand Up @@ -844,15 +844,15 @@ called on C<$o>. The C<:local> named argument limits the returned methods to
those defined in the C<Programmer> class and excludes the inherited methods.
The syntax of calling a method with C<.^> instead of a single dot means that
it is actually a method call on its I<meta class>, which is a class managing
it is actually a method call on its I<metaclass>, which is a class managing
the properties of the C<Programmer> class – or any other class you are
interested in. This meta class enables other ways of introspection too:
interested in. This metaclass enables other ways of introspection too:
=for code :preamble<my $o>
say $o.^attributes.join(', ');
say $o.^parents.map({ $_.^name }).join(', ');
Finally C<$o.^name> calls the C<name> method on the meta object, which
Finally C<$o.^name> calls the C<name> method on the metaobject, which
unsurprisingly returns the class name.
Introspection is very useful for debugging and for learning the language
Expand Down

0 comments on commit 3825edb

Please sign in to comment.