Algorithm-C3
view release on metacpan or search on metacpan
343536373839404142434445464748495051525354
preserving
local
precedence orderings.
Below is a brief explanation of C3 taken from the Class::C3 module. For
more detailed information, see the
"SEE ALSO"
section and the links
there.
What is C3?
C3 is the name of an algorithm which aims to provide a sane method
resolution order under multiple inheritance. It was first introduced in
the language Dylan (see links in the
"SEE ALSO"
section), and then later
adopted as the preferred MRO (Method Resolution Order)
for
the new-style
classes in Python 2.3. Most recently it
has
been adopted as the
'canonical'
MRO
for
Perl 6 classes, and the
default
MRO
for
Parrot
objects as well.
How does C3 work.
C3 works by always preserving
local
precedence ordering. This
essentially means that
no
class will appear
before
any of it's
subclasses. Take the classic diamond inheritance pattern
for
instance:
<A>
lib/Algorithm/C3.pm view on Meta::CPAN
172173174175176177178179180181182183184185186187188189190191Below is a brief explanation of C3 taken from the L<Class::C3>
module. For more detailed information, see the L<SEE ALSO> section
and the links there.
=head2 What is C3?
C3 is the name of an algorithm which aims to provide a sane method
resolution order under multiple inheritance. It was first introduced
in the language Dylan (see links in the L<SEE ALSO> section), and
then later adopted as the preferred MRO (Method Resolution Order)
for the new-style classes in Python 2.3. Most recently it has been
adopted as the 'canonical' MRO for Perl 6 classes, and the default
MRO for Parrot objects as well.
=head2 How does C3 work.
C3 works by always preserving local precedence ordering. This
essentially means that no class will appear before any of it's
subclasses. Take the classic diamond inheritance pattern for
instance:
( run in 0.583 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )