Moose::Meta::Class - The Moose metaclass
This is a subclass of Class::MOP::Class with Moose specific extensions.
For the most part, the only time you will ever encounter an instance of this class is if you are doing some serious deep introspection. To really understand this class, you need to refer to the Class::MOP::Class documentation.
Overrides original to accept a list of roles to apply to the created class.
my $metaclass = Moose::Meta::Class->create( 'New::Class', roles => [...] );
Overrides original to support roles and caching.
my $metaclass = Moose::Meta::Class->create_anon_class( superclasses => ['Foo'], roles => [qw/Some Roles Go Here/], cache => 1, );
Override original to add default options for inlining destructor and altering the Constructor metaclass.
Override original to lock add_role and memoize calculate_all_roles
add_role
calculate_all_roles
We override this method to support the trigger attribute option.
trigger
This provides some Moose specific extensions to this method, you almost never call this method directly unless you really know what you are doing.
This method makes sure to handle the moose weak-ref, type-constraint and type coercion features.
This accommodates Moose::Meta::Role::Method instances, which are aliased, instead of added, but still need to be counted as valid methods.
This will create an override method modifier for you, and install it in the package.
override
This will create an augment method modifier for you, and install it in the package.
augment
This will return an array of Moose::Meta::Role instances which are attached to this class.
Moose::Meta::Role
This takes an instance of Moose::Meta::Role in $role, and adds it to the list of associated roles.
$role
This will test if this class does a given $role_name. It will not only check it's local roles, but ask them as well in order to cascade down the role hierarchy.
does
$role_name
This will test if this class excludes a given $role_name. It will not only check it's local roles, but ask them as well in order to cascade down the role hierarchy.
excludes
This method does the same thing as Class::MOP::Class::add_attribute, but adds support for taking the $params as a HASH ref.
$params
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan@iinteractive.com>
Copyright 2006-2008 by Infinity Interactive, Inc.
http://www.iinteractive.com
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Moose, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Moose
CPAN shell
perl -MCPAN -e shell install Moose
For more information on module installation, please visit the detailed CPAN module installation guide.