|
Problem:
You want your class to inherit from more than one parent class. Solution:
Specify a list after
Discussion: Perl6 supports multiple inheritance. To inherit from multiple parent classes, just specify each of those classes in the class declaration, as above. Order is important. When searching through the parents of a class (to find the implementation of a method, for example), parents are always searched left-to-right. If a method exists in Issue: Are inheritance trees searched depth-first, as before? Any way around that?
|