Metaobject representing a Raku package.
does Metamodel::Namingdoes Metamodel::Documentingdoes Metamodel::Stashingdoes Metamodel::TypePretensedoes Metamodel::MethodDelegation
Warning: this class is part of the Rakudo implementation, and is not a part of the language specification.
Metamodel::PackageHOW is the metaclass behind the
;say P.HOW; # OUTPUT: «Perl6::Metamodel::PackageHOW.new␤»
Returns the archetypes for this model, that is, the properties a metatype can implement.
Creates a new
method new_type(: = '<anon>', :, :, :)
Creates a new package, with optional representation, version and auth field.
method compose(, :)
Sets the metapackage as composed.
Returns the composed status of the metapackage.
Metamodel::PackageHOW does role Metamodel::Naming, which provides the following routines:
Returns the name of the metaobject, if any.
say 42.^name; # OUTPUT: «Int␤»
method set_name(, )
Sets the new name of the metaobject.
Metamodel::PackageHOW does role Metamodel::Documenting, which provides the following routines:
Sets the documentation for a type to
Returns the documentation for a type.
Metamodel::PackageHOW does role Metamodel::Stashing, which provides the following routines:
Creates and sets a stash for a type, returning
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␤»