In Metaobject protocol (MOP)§
See primary documentation in context for HOW.
Returns the metaclass object, as in "Higher Order Workings".
say (%).HOW.^name # OUTPUT: «Perl6::Metamodel::ClassHOW+{<anon>}»
HOW
returns an object of type Perl6::Metamodel::ClassHOW
in this case; objects of this type are used to build classes. The same operation on the &
sigil will return Perl6::Metamodel::ParametricRoleGroupHOW
. You will be calling this object whenever you use the ^
syntax to access metamethods. In fact, the code above is equivalent to say (&).HOW.HOW.name(&)
which is much more unwieldy. Metamodel::ClassHOW
is part of the Rakudo implementation, so use with caution.