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 v2.5.10
10

DESCRIPTION

12       This class is a meta object protocol for Mouse classes, which is a
13       subset of Moose::Meta:::Class.
14

METHODS

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

SEE ALSO

81       Mouse::Meta::Module
82
83       Moose::Meta::Class
84
85       Class::MOP::Class
86
87
88
89perl v5.32.0                      2020-07-28             Mouse::Meta::Class(3)
Impressum