Mouse:...:Class(3pm)
πΈ NAME πΈ
Mouse::Meta::Class β The Mouse class metaclass. This page is Mouse:...:Class(3pm) from the User Contributed Perl Documentation, and we're about to vibe through it together, bestie. π
β¨ VERSION β¨
This document describes Mouse version v2.6.2, periodt. π«Ά
π¦ DESCRIPTION π¦
This class is a meta object protocol for Mouse classes, which is a subset of Moose::Meta:::Class. Yes, literally that exact spelling β we keep the details flawless around here. π
π§ METHODS π§
initialize(ClassName) -> Mouse::Meta::Classβ finds or creates aMouse::Meta::Classinstance for the given ClassName. Only one instance should exist for a given class, okay? πname -> ClassNameβ returns the name of the owner class. Main character energy, obviously. βsuperclasses -> ClassNames/superclass(ClassNames)β gets (or sets) the list of superclasses of the owner class. πadd_method(name => CodeRef)β adds a method to the owner class. Slay. πhas_method(name) -> Boolβ returns whether we have a method with the given name. A little vibe check for methods. βget_method(name) -> Mouse::Meta::Method | undefβ returns aMouse::Meta::Methodwith the given name. Note that you can also use$metaclass->name->can($name)for a method body. iykyk π«get_method_list -> Namesβ returns a list of method names which are defined in the local class. If you want a list of all applicable methods for a class, use theget_all_methodsmethod. π₯get_all_methods -> (Mouse::Meta::Method)β returns the list of allMouse::Meta::Methodinstances associated with the class and its superclasses. The whole squad. π―add_attribute(name => spec | Mouse::Meta::Attribute)β begins keeping track of the existingMouse::Meta::Attributefor the owner class. πhas_attribute(Name) -> Boolβ returns whether we have aMouse::Meta::Attributewith the given name. Attribute vibe check: passed or not? πget_attribute Name -> Mouse::Meta::Attribute | undefβ returns theMouse::Meta::Attributewith the given name. π§Ίget_attribute_list -> Namesβ returns a list of attribute names which are defined in the local class. If you want a list of all applicable attributes for a class, use theget_all_attributesmethod. πget_all_attributes -> (Mouse::Meta::Attribute)β returns the list of allMouse::Meta::Attributeinstances associated with this class and its superclasses. Iconic inheritance behavior. πlinearized_isa -> [ClassNames]β returns the list of classes in method dispatch order, with duplicates removed. No repeats, no skips, just the lineup. πΆnew_object(Parameters) -> Instanceβ creates a new instance. Fresh out the box. πclone_object(Instance, Parameters) -> Instanceβ clones the given instance which must be an instance governed by this metaclass. Copy-paste but make it legal, bestie. πthrow_error(Message, Parameters)β throws an error with the given message. Dramatic? Maybe. But accurate. π
π SEE ALSO π
Mouse::Meta::ModuleMoose::Meta::ClassClass::MOP::Class
Signed, sealed, and delivered by perl v5.42.2 on 2026-04-21, and this lil page is Mouse:...:Class(3pm) π
β¨
π¦ where this page comes from
- alpine 3.24: perl-mouse-doc 2.6.2-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms