method add_stash
1 | role Metamodel::Stashing |
1.1 | (Metamodel::Stashing) method add_stash |
Documentation for method add_stash
assembled from the following types:
role Metamodel::Stashing
From Metamodel::Stashing
(Metamodel::Stashing) method add_stash
method add_stash()
Creates and sets a stash for a type, returning $type_obj
.
This method is typically called as the last step of creating a new type. For example, this is how it would be used in a minimal HOW that only supports naming and stashing:
does Metamodel::Namingdoes Metamodel::Stashingmy Mu constant WithStash = WithStashHOW.new_type: :name<WithStash>;say WithStash.WHO; # OUTPUT: «WithStash»