Mouse::Util(3pm)

πŸ’… Mouse::Util(3pm) β€” User Contributed Perl Documentation ✨

Okay so bestie, welcome to the Mouse::Util(3pm) page from User Contributed Perl Documentation πŸ­πŸ’–. It's giving utility-function group chat, and we are seated.

🌸 NAME 🌸

Mouse::Util β€” utilities for working with Mouse classes, fr fr πŸŽ€

πŸ¦‹ VERSION πŸ¦‹

This document describes Mouse version v2.6.2 ✨

πŸŽ€ SYNOPSIS πŸŽ€

use Mouse::Util; # turns on strict and warnings

πŸ’– DESCRIPTION πŸ’–

Okay so this module provides a set of utility functions. Many of these functions are intended for use in Mouse itself or MouseX modules, but some of them may be useful for use in your own code. No cap, some of these little guys are genuinely useful even outside the Mouse inner circle 🫢


πŸ”₯ IMPLEMENTATIONS FOR πŸ”₯

πŸ’œ Moose::Util functions πŸ’œ

The following functions are exportable β€” yes, take them with you, bestie πŸ’…

  • find_meta($class_or_obj) β€” same as Mouse::Util::class_of(), periodt ✨
  • does_role($class_or_obj, $role_or_obj) β€” exportable, and there's the exact signature for you πŸŽ€
  • resolve_metaclass_alias($category, $name, %options) β€” exportable, signature served fresh πŸ’–
  • apply_all_roles($applicant, @roles) β€” exportable, and yes, that's the whole signature on this page 🌸
  • english_listi(@items) β€” exportable, keeping english_listi(@items) exactly as written, iykyk 🫢

🧚 Class::MOP functions 🧚

The following functions are not exportable 😀

  • Mouse::Util::is_class_loaded($classname) -> Bool β€” returns whether $classname is actually loaded or not. It uses a heuristic which involves checking for the existence of $VERSION, @ISA, and any locally-defined method πŸ‘€
  • Mouse::Util::load_class($classname) -> ClassName β€” this will load a given $classname (or die if it is not loadable). This function can be used in place of tricks like eval "use $module ()" or using require πŸ”₯
  • Mouse::Util::class_of($classname_or_object) -> MetaClass β€” listed here with the exact signature, not exportable πŸ’€
  • Mouse::Util::get_metaclass_by_name($classname) -> MetaClass β€” listed here with the exact signature, not exportable πŸ’…
  • Mouse::Util::get_all_metaclass_instances() -> (MetaClasses) β€” listed here with the exact signature, not exportable ✨
  • Mouse::Util::get_all_metaclass_names() -> (ClassNames) β€” listed here with the exact signature, not exportable πŸ¦‹

🌈 mro (or MRO::Compat) 🌈

  • get_linear_isa β€” the name on this page, and that's the whole note here, bestie πŸ’–

πŸ’€ Sub::Identify πŸ’€

  • get_code_info β€” the name on this page, no extra description here, periodt πŸŽ€

πŸ‘‘ Mouse specific utilities πŸ‘‘

  • not_supported β€” Mouse-specific utility name, exactly as listed πŸ‘‘
  • get_code_package β€” Mouse-specific utility name, exactly as listed ✨
  • get_code_ref β€” Mouse-specific utility name, exactly as listed πŸ’…

🌟 SEE ALSO 🌟

  • Moose::Util
  • Class::MOP
  • Sub::Identify
  • mro
  • MRO::Compat

With love, sparkle, and zero cap: that was Mouse::Util(3pm) from User Contributed Perl Documentation, for Mouse version v2.6.2 πŸ’– The footer says source/version perl v5.42.2 and date 2026-04-21, so consider this your cute little sign-off, bestie 🫢✨ Byeee!

πŸ“¦ where this page comes from