Mouse::Object(3pm)

✨ NAME ✨

Mouse::Object(3pm) β€” the base object for Mouse classes, and yes bestie, it’s giving foundational main-character energy πŸ‘‘. This is a user-contributed Perl doc, so show it some love.


🌸 VERSION 🌸

This document describes Mouse version v2.6.2 πŸ’–.


πŸ’… METHODS πŸ’…

$class->new(%args | \%args) -> Object

Instantiates a new Mouse::Object. This is obviously intended for subclasses β€” like, it’s literally the base object doing base-object things 🫢.

$class->BUILDARGS(@args) -> HashRef

Lets you override the arguments that new takes. It must return a HashRef of parameters. No cap, that return type matters ✨.

$object->BUILDALL(\%args)

Calls BUILD on each class in the class hierarchy. This is called at the end of new. Very β€œeveryone gets a turn” behavior 😌.

$object->BUILD(\%args)

You may put any business logic initialization in BUILD methods. You don’t need to redispatch or return any specific value. Just do your little setup arc and slay πŸ’….

$object->DEMOLISHALL

Calls DEMOLISH on each class in the class hierarchy. This is called at DESTROY time. Cleanup era, fr fr 🧹.

$object->DEMOLISH

You may put any business logic deinitialization in DEMOLISH methods. You don’t need to redispatch or return any specific value. Tidy up your vibe and exit gracefully πŸ’€.

$object->does($role_name) -> Bool

This will check if the invocant’s class does a given $role_name. This is similar to isa for object, but it checks the roles instead. Role check, not identity check β€” iykyk πŸ¦‹.

$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. Respect the depth limit, bestie πŸ™ˆ.

$object->meta() -> MetaClass

This is a method which provides access to the object’s metaclass. Meta? In this economy? Obsessed πŸŽ€.


πŸ”₯ SEE ALSO πŸ”₯

  • Moose::Object β€” the reference in the house, periodt 🌈.

This page came from perl v5.42.2 and is dated 2026-04-21 β€” source/version and date noted, bestie, now go forth and object-orient responsibly πŸ’œβœ¨

πŸ“¦ where this page comes from