Stevan Little > Moose-0.34 > Moose::Meta::Class

Download:
Moose-0.34.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  11
Open  41
Stalled  8
View/Report Bugs
Module Version: 0.17   Source   Latest Release: Moose-2.1403

NAME ^

Moose::Meta::Class - The Moose metaclass

DESCRIPTION ^

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.

METHODS ^

initialize
make_immutable

Override original to add default options for inlining destructor and altering the Constructor metaclass.

create_immutable_transformer

Override original to lock add_role and memoize calculate_all_roles

new_object

We override this method to support the trigger attribute option.

construct_instance

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.

get_method_map

This accommodates Moose::Meta::Role::Method instances, which are aliased, instead of added, but still need to be counted as valid methods.

add_override_method_modifier ($name, $method)

This will create an override method modifier for you, and install it in the package.

add_augment_method_modifier ($name, $method)

This will create an augment method modifier for you, and install it in the package.

calculate_all_roles
roles

This will return an array of Moose::Meta::Role instances which are attached to this class.

add_role ($role)

This takes an instance of Moose::Meta::Role in $role, and adds it to the list of associated roles.

does_role ($role_name)

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.

excludes_role ($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.

add_attribute ($attr_name, %params|$params)

This method does the same thing as Class::MOP::Class::add_attribute, but adds support for taking the $params as a HASH ref.

BUGS ^

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.

AUTHOR ^

Stevan Little <stevan@iinteractive.com>

COPYRIGHT AND LICENSE ^

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.

syntax highlighting: