.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Mouse::Object 3pm" .TH Mouse::Object 3pm 2023-07-26 "perl v5.38.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Mouse::Object \- The base object for Mouse classes .SH VERSION .IX Header "VERSION" This document describes Mouse version v2.5.10 .SH METHODS .IX Header "METHODS" .ie n .SS """$class\->new(%args | \e%args) \-> Object""" .el .SS "\f(CW$class\->new(%args | \e%args) \-> Object\fP" .IX Subsection "$class->new(%args | %args) -> Object" Instantiates a new \f(CW\*(C`Mouse::Object\*(C'\fR. This is obviously intended for subclasses. .ie n .SS """$class\->BUILDARGS(@args) \-> HashRef""" .el .SS "\f(CW$class\->BUILDARGS(@args) \-> HashRef\fP" .IX Subsection "$class->BUILDARGS(@args) -> HashRef" Lets you override the arguments that \f(CW\*(C`new\*(C'\fR takes. It must return a HashRef of parameters. .ie n .SS """$object\->BUILDALL(\e%args)""" .el .SS \f(CW$object\->BUILDALL(\e%args)\fP .IX Subsection "$object->BUILDALL(%args)" Calls \f(CW\*(C`BUILD\*(C'\fR on each class in the class hierarchy. This is called at the end of \f(CW\*(C`new\*(C'\fR. .ie n .SS """$object\->BUILD(\e%args)""" .el .SS \f(CW$object\->BUILD(\e%args)\fP .IX Subsection "$object->BUILD(%args)" You may put any business logic initialization in BUILD methods. You don't need to redispatch or return any specific value. .ie n .SS """$object\->DEMOLISHALL""" .el .SS \f(CW$object\->DEMOLISHALL\fP .IX Subsection "$object->DEMOLISHALL" Calls \f(CW\*(C`DEMOLISH\*(C'\fR on each class in the class hierarchy. This is called at \&\f(CW\*(C`DESTROY\*(C'\fR time. .ie n .SS """$object\->DEMOLISH""" .el .SS \f(CW$object\->DEMOLISH\fP .IX Subsection "$object->DEMOLISH" You may put any business logic deinitialization in DEMOLISH methods. You don't need to redispatch or return any specific value. .ie n .SS """$object\->does($role_name) \-> Bool""" .el .SS "\f(CW$object\->does($role_name) \-> Bool\fP" .IX Subsection "$object->does($role_name) -> Bool" This will check if the invocant's class \fBdoes\fR a given \f(CW$role_name\fR. This is similar to \f(CW\*(C`isa\*(C'\fR for object, but it checks the roles instead. .ie n .SS """$object\->dump($maxdepth) \-> Str""" .el .SS "\f(CW$object\->dump($maxdepth) \-> Str\fP" .IX Subsection "$object->dump($maxdepth) -> Str" This is a handy utility for dumping an object with Data::Dumper. By default, the maximum depth is 3, to avoid making a mess. .ie n .SS """$object\->meta() \-> MetaClass""" .el .SS "\f(CW$object\->meta() \-> MetaClass\fP" .IX Subsection "$object->meta() -> MetaClass" This is a method which provides access to the object's metaclass. .SH "SEE ALSO" .IX Header "SEE ALSO" Moose::Object