method mixin
1 | role Metamodel::Mixins |
1.1 | (Metamodel::Mixins) method mixin |
Documentation for method mixin
assembled from the following types:
role Metamodel::Mixins
From Metamodel::Mixins
(Metamodel::Mixins) method mixin
method mixin(, *, :)
Generates a new mixin type by calling generate_mixin
with $obj
and @roles
. If $obj
is composed, the mixin cache of $obj
will be checked for any existing mixin for these beforehand. If $obj
is an instance of a type, this will return $obj
reblessed with the mixin generated, otherwise this will return the mixin itself.
If $needs-mixin-attribute
is True
, this will throw an exception if no mixin attribute exists on the mixin generated before returning.