Documentation for trait is
Documentation for trait is, assembled from the following types:
multi sub trait_mod:<is>(Mu , Mu )
is accepts a type object to be added as a parent class of a class in its definition. To allow multiple inheritance the trait can be applied more then once. Adding parents to a class will import their methods into the target class. If the same method name occurs in multiple parents, the first added parent will win.
is trait is provided the default of
Any will be used as a parent class. This forces all Perl 6 objects to have the same set of basic methods to provide an interface for introspection and coercion to basic types.
dd A.new.^parents(:all);# OUTPUT: «(Any, Mu)␤»is A is Bdd C.new.from-a();# OUTPUT: «"A::from-a"␤»