1Mouse::Meta::Class(3) User Contributed Perl DocumentationMouse::Meta::Class(3)
2
3
4

NAME

6       Mouse::Meta::Class - The Mouse class metaclass
7

VERSION

9       This document describes Mouse version 0.58
10

METHODS

12   "initialize(ClassName) -> Mouse::Meta::Class"
13       Finds or creates a "Mouse::Meta::Class" instance for the given
14       ClassName. Only one instance should exist for a given class.
15
16   "name -> ClassName"
17       Returns the name of the owner class.
18
19   "superclasses -> ClassNames" "superclass(ClassNames)"
20       Gets (or sets) the list of superclasses of the owner class.
21
22   "add_method(name => CodeRef)"
23       Adds a method to the owner class.
24
25   "has_method(name) -> Bool"
26       Returns whether we have a method with the given name.
27
28   "get_method(name) -> Mouse::Meta::Method | undef"
29       Returns a Mouse::Meta::Method with the given name.
30
31       Note that you can also use "$metaclass->name->can($name)" for a method
32       body.
33
34   "get_method_list -> Names"
35       Returns a list of method names which are defined in the local class.
36       If you want a list of all applicable methods for a class, use the
37       "get_all_methods" method.
38
39   "get_all_methods -> (Mouse::Meta::Method)"
40       Return the list of all Mouse::Meta::Method instances associated with
41       the class and its superclasses.
42
43   "add_attribute(name => spec | Mouse::Meta::Attribute)"
44       Begins keeping track of the existing Mouse::Meta::Attribute for the
45       owner class.
46
47   "has_attribute(Name) -> Bool"
48       Returns whether we have a Mouse::Meta::Attribute with the given name.
49
50   "get_attribute Name -> Mouse::Meta::Attribute | undef"
51       Returns the Mouse::Meta::Attribute with the given name.
52
53   "get_attribute_list -> Names"
54       Returns a list of attribute names which are defined in the local class.
55       If you want a list of all applicable attributes for a class, use the
56       "get_all_attributes" method.
57
58   "get_all_attributes -> (Mouse::Meta::Attribute)"
59       Returns the list of all Mouse::Meta::Attribute instances associated
60       with this class and its superclasses.
61
62   "linearized_isa -> [ClassNames]"
63       Returns the list of classes in method dispatch order, with duplicates
64       removed.
65
66   "new_object(Parameters) -> Instance"
67       Creates a new instance.
68
69   "clone_object(Instance, Parameters) -> Instance"
70       Clones the given instance which must be an instance governed by this
71       metaclass.
72
73   "throw_error(Message, Parameters)"
74       Throws an error with the given message.
75

SEE ALSO

77       Mouse::Meta::Module
78
79       Moose::Meta::Class
80
81       Class::MOP::Class
82
83
84
85perl v5.12.0                      2010-05-08             Mouse::Meta::Class(3)
Impressum