X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse%2FUtil.pm;h=2a03160833536af310f5a3c33bf807d87f116c8a;hb=fea36fd29b45961b8687f1aee7fd2701c984fae4;hp=1bf2f7d2567304cdc728da1eddd369f26b683ad8;hpb=deb9a0f32002cd07012c50884a227335b93f1449;p=gitmo%2FMouse.git diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index 1bf2f7d..2a03160 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -322,7 +322,7 @@ sub not_supported{ } sub meta{ - return Mouse::Meta::Class->initialize($_[0]); + return Mouse::Meta::Class->initialize(ref($_[0]) || $_[0]); } sub dump { @@ -374,13 +374,13 @@ This will load a given C (or die if it is not loadable). This function can be used in place of tricks like C or using C. -=head2 C<< Mouse::Util::class_of(ClassName) >> +=head3 C<< Mouse::Util::class_of(ClassName or Object) >> -The counterpart of C. This is not exportable. +=head3 C<< Mouse::Util::get_metaclass_by_name(ClassName) >> -=head2 C<< Mouse::Util::get_metaclass_by_name(ClassName) >> +=head3 C<< Mouse::Util::get_all_metaclass_instances() >> -The counterpart of C. This is not exportable. +=head3 C<< Mouse::Util::get_all_metaclass_names() >> =head2 MRO::Compat @@ -398,7 +398,7 @@ The counterpart of C. This is not exportabl L -L +L L