UR::Role::Prototype - Implementation for defining and composing roles
Basic info about using roles is described in the documentation for UR::Role.
When a role is defined using the role keyword, it creates a UR::Role::Prototype instance. Role prototypes represent an uncomposed role. They have most of the same properties as UR::Object::Type instances.
role
Returns a hashref of property data about the named property.
Returns a list of all the properties named in the role's has.
has
Returns a list of all the properties named in the roles's id_by.
id_by
Returns a list of all the function names in the role's namespace.
Define a role and return the role prototype.
Return the name of the role.
Returns a list of the names of the classes composing this role.
Returns an arrayref of strings. These strings must exist in composing classes, either as properties or methods.
Returns an arrayref of role names that may not be composed with this role.
When a role is defined, these methods are injected into the role's namespace
Return a UR::Role::PrototypeWithParams object representing this role with a set of params immediately before it is composed into a class. See the section on Parameterized Roles in UR::Role.
Calls the above create() method with no arguments. This is used by the role composition mechanism to trigger autoloading the role's module when role names are given as strings in a class definition.
create()
UR, UR::Object::Type::Initializer, UR::Role::Instance, UR::Role::PrototypeWithParams
To install UR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm UR
CPAN shell
perl -MCPAN -e shell install UR
For more information on module installation, please visit the detailed CPAN module installation guide.