Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 88a9ba4fb8
Fetching contributors…

Cannot retrieve contributors at this time

file 114 lines (66 sloc) 3.122 kb

This document describes the meta-objects that constitute Rakudo's objects implementation. It also describes the API to implement should you wish to introduce your own meta-objects.

Rakudo is built on top of the NQP platform. NQP provides an object model core that is often known as "6model". It is inspired by the needs of Perl 6, but actually provides a very minimal base that other languages can build their own meta-objects on top of.

While Rakudo could start from these base primitives, instead it makes use of some of the NQP meta-objects. Out of the box 6model provides no concept of classes or roles. NQP's meta-objects include a simple, non-parametric implementation of roles and a simple but capable implementation of classes. These are put to use in writing Rakudo's meta-objects.

The Rakudo meta-objects are generally factored in terms of roles. These are composed into classes that represent the various types of Perl 6 package (such as classes and roles).

The following roles exist and provide re-usable pieces of functionality that can be re-used in various places in the meta-model.

This role provides storage of methods, method addition and method introspection.

This role provides the extra pieces needed for multi-method handling.

This role provides storage of attributes, attribute addition and attribute introspection.

This role provides storage of roles, role addition and role introspection. The composition process is not part of the functionality provided by this role, however.

Provides for addition of multiple parents, and introspection of them too.

This role provides an implementation of the C3 method resolution order.

This role provides storage and introspection of a version and authority.

The following classes exist in the Perl 6 meta-model.

Provides an implementation of modules.

Provides an implementation of classes.

Provides an implementation of parametric roles, which may be instantiated.

Provides an implementation of a concrete instance of a role.

Provides an implementation of grammars. Actually, just a subclass of the ClassHOW since grammars are really just slightly specialized classes.

Meta-object for a native type (only accesible via the type object, perhaps).

Provides an implementation of subset types.

Represents an attribute.

Composes a single role into a class. (If many roles are specified, it makes a single role that does all of the roles the class wishes to, and then composes that single role).

Composes one or more roles into another role, creating a kind of role "summation".

Compoes a role into an object - essentially doing a mix-in.

Something went wrong with that request. Please try again.