Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mouse::util(3pm) [debian man page]

Mouse::Util(3pm)					User Contributed Perl Documentation					  Mouse::Util(3pm)

NAME
Mouse::Util - Utilities for working with Mouse classes VERSION
This document describes Mouse version 0.99 SYNOPSIS
use Mouse::Util; # turns on strict and warnings DESCRIPTION
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. IMPLEMENTATIONS FOR
Moose::Util functions The following functions are exportable. "find_meta($class_or_obj)" The same as "Mouse::Util::class_of()". "does_role($class_or_obj, $role_or_obj)" "resolve_metaclass_alias($category, $name, %options)" "apply_all_roles($applicant, @roles)" "english_listi(@items)" 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" "Mouse::Util::get_metaclass_by_name($classname) -> MetaClass" "Mouse::Util::get_all_metaclass_instances() -> (MetaClasses)" "Mouse::Util::get_all_metaclass_names() -> (ClassNames)" mro (or MRO::Compat) "get_linear_isa" Sub::Identify "get_code_info" Mouse specific utilities "not_supported" "get_code_package" "get_code_ref" SEE ALSO
Moose::Util Class::MOP Sub::Identify mro MRO::Compat perl v5.14.2 2012-06-30 Mouse::Util(3pm)

Check Out this Related Man Page

Any::Moose(3pm) 					User Contributed Perl Documentation					   Any::Moose(3pm)

NAME
Any::Moose - use Moose or Mouse modules VERSION
version 0.17 SYNOPSIS
BASIC package Class; # uses Moose if it's loaded or demanded, Mouse otherwise use Any::Moose; # cleans the namespace up no Any::Moose; OTHER MODULES package Other::Class; use Any::Moose; # uses Moose::Util::TypeConstraints if the class has loaded Moose, # Mouse::Util::TypeConstraints otherwise. use Any::Moose '::Util::TypeConstraints'; ROLES package My::Sorter; use Any::Moose 'Role'; requires 'cmp'; COMPLEX USAGE package My::Meta::Class; use Any::Moose; # uses subtype from Moose::Util::TypeConstraints if the class loaded Moose, # subtype from Mouse::Util::TypeConstraints otherwise. # similarly for Mo*se::Util's does_role use Any::Moose ( '::Util::TypeConstraints' => ['subtype'], '::Util' => ['does_role'], ); # uses MouseX::Types or MooseX::Types use Any::Moose 'X::Types'; # gives you the right class name depending on which Mo*se was loaded extends any_moose('::Meta::Class'); DESCRIPTION
Though we recommend that people generally use Moose, we accept that Moose cannot yet be used for everything everywhere. People generally like the Moose sugar, so many people use Mouse, a lightweight replacement for parts of Moose. Because Mouse strives for compatibility with Moose, it's easy to substitute one for the other. This module facilitates that substitution. By default, Mouse will be provided to libraries, unless Moose is already loaded -or- explicitly requested by the end-user. The end-user can force the decision of which backend to use by setting the environment variable "ANY_MOOSE" to be "Moose" or "Mouse". Note that the decision of which backend to use is made only once, so that if Any-Moose picks Mouse, then a third-party library loads Moose, anything else that uses Any-Moose will continue to pick Mouse. So, if you have to use Mouse, please be considerate to the Moose fanboys (like myself!) and use Any-Moose instead. ":)" SEE ALSO
Moose Mouse Squirrel - a deprecated first-stab at Any-Moose-like logic. Its biggest fault was in making the decision of which backend to use every time it was used, rather than just once. AUTHORS
o Shawn M Moore <sartak@bestpractical.com> o Florian Ragwitz <rafl@debian.org> o Stevan Little <stevan@iinteractive.com> o Tokuhiro Matsuno <tokuhirom@gmail.com> o Goro Fuji <gfuji@cpan.org> COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Best Practical Solutions. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.4 2011-09-16 Any::Moose(3pm)
Man Page