Skip to content

Commit

Permalink
fixes by masak++
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Aug 4, 2012
1 parent c6ac771 commit 2c69e87
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/objects.pod
Expand Up @@ -224,9 +224,9 @@ Classes can have I<parent classes>.
class Child is Parent1 is Parent2 { }
If a method is called on the child class, and the child class does not
provide that method, the parents' method of the name is invoked instead,
if it exists. The order by which parent classes are consulted is called the
I<method resolution order> (mro). Perl 6 uses the
provide that method, the parent classes' method of that name is invoked instead,
if it exists. The order in which parent classes are consulted is called the
I<method resolution order> (MRO). Perl 6 uses the
L<C3 method resolution order|https://en.wikipedia.org/wiki/C3_linearization>.
You can ask a type for its MRO through a call to its metaclass:
Expand All @@ -253,13 +253,13 @@ arguments and uses them to initialize public attributes.
has $.x;
has $.y = 2 * $!x;
}
my $p = Point.new( x => 1, y => 2);
my $p = Point.new( x => 1, y => 2);
# ^^^ inherited from class Mu
Mu.new calls method L<bless> on its invocant, passing along all the named
arguments. C<bless> creates the new object, and then calls method C<BUILDALL>
on it. C<BUILDALL> walks all subclasses in reverse method resolution order
(ie from L<Mu> to most derived classes), and in each class checks for
(i.e. from L<Mu> to most derived classes), and in each class checks for
existence of a method named C<BUILD>. If it exists, it is called, again
passing all named arguments from method C<new> to it. If not, the public
attributes from this class are initialized from named arguments of the same
Expand Down

0 comments on commit 2c69e87

Please sign in to comment.