Course of Raku / Objects, I/O, and exceptions / Classes and objects
The metaobject protocol 🆕
Every class, role, and type in Raku is itself described by another object — its metaobject — which knows the type’s name, its attributes, its methods, and its place in the inheritance tree. The interface to these metaobjects is the metaobject protocol, or MOP.
You have already used a corner of it: .^name is a MOP
call. This section shows the .^ syntax properly, the most
useful meta-methods for inspecting a type, and how the MOP even lets you
add methods to a class while the program runs.
Topics in this section
Practice
Complete the quiz that covers the contents of this section.
Exercises
This section contains 4 exercises. Examine all the topics of this section before doing the coding practice.