BrowserREPL-button-tip-on BrowserREPL-button-tip-off

EditButtonTip 2020-01-11

role Metamodel::Naming

Metaobject that supports named types

role Metamodel::Naming { }
Code

Warning: this role is part of the Rakudo implementation, and is not a part of the language specification.

Metamodel role for (optionally) named things, like classes, roles and enums.

Methods§

method name§

method name($type)
Code

Returns the name of the metaobject, if any.

say 42.^name;       # OUTPUT: «Int␤»
Code

method set_name§

method set_name($type, $new_name)
Code

Sets the new name of the metaobject.