From: gfx Date: Tue, 23 Feb 2010 01:42:15 +0000 (+0900) Subject: Export load_class and is_class_loaded to the Mouse:: package in Mouse::Util X-Git-Tag: 0.50_04~22 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=01f892fafd4633960960c120650e32ecf549e369;p=gitmo%2FMouse.git Export load_class and is_class_loaded to the Mouse:: package in Mouse::Util --- diff --git a/lib/Mouse.pm b/lib/Mouse.pm index c484fda..8bdced4 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -8,7 +8,7 @@ our $VERSION = '0.50_03'; use Carp qw(confess); use Scalar::Util qw(blessed); -use Mouse::Util qw(load_class is_class_loaded get_code_package not_supported); +use Mouse::Util (); use Mouse::Meta::Module; use Mouse::Meta::Class; diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index cd6297a..f6be4ea 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -74,12 +74,16 @@ use constant _MOUSE_VERBOSE => !!$ENV{MOUSE_VERBOSE}; # it must be 'require', not 'use', because Mouse::Meta::Module depends on Mouse::Util require Mouse::Meta::Module; # for the entities of metaclass cache utilities -BEGIN { +# aliases +{ *class_of = \&Mouse::Meta::Module::_class_of; *get_metaclass_by_name = \&Mouse::Meta::Module::_get_metaclass_by_name; *get_all_metaclass_instances = \&Mouse::Meta::Module::_get_all_metaclass_instances; *get_all_metaclass_names = \&Mouse::Meta::Module::_get_all_metaclass_names; + *Mouse::load_class = \&load_class; + *Mouse::is_class_loaded = \&is_class_loaded; + # is-a predicates #generate_isa_predicate_for('Mouse::Meta::TypeConstraint' => 'is_a_type_constraint'); #generate_isa_predicate_for('Mouse::Meta::Class' => 'is_a_metaclass');