In Metamodel::ClassHOW§

See primary documentation in context for method compose

method compose($obj)

A call to compose brings the metaobject and thus the class it represents into a fully functional state, so if you construct or modify a class, you must call the compose method before working with the class.

It updates the method cache, checks that all methods that are required by roles are implemented, does the actual role composition work, and sets up the class to work well with language interoperability.

In Metamodel::EnumHOW§

See primary documentation in context for method compose

method compose($obj:$compiler_services)

Completes a type object for an enum. This is when any roles done by the enum are mixed in. This needs to be called before any enum values can be added using .add_enum_value.