X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse.pm;h=7cdd2438554c0376cc29eb93cda092fea84e3e6f;hp=fea2bfbf2fde0d33b5d671415c4824e00b81124c;hb=448fbe3285470e2885ab4e105044fa84bdc9e078;hpb=124fa02749d8411ff5bd0916442d97f76a94ca63 diff --git a/lib/Mouse.pm b/lib/Mouse.pm index fea2bfb..7cdd243 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -4,7 +4,7 @@ use warnings; use 5.006; use base 'Exporter'; -our $VERSION = '0.22'; +our $VERSION = '0.24'; use Carp 'confess'; use Scalar::Util 'blessed'; @@ -191,6 +191,12 @@ sub is_class_loaded { return 0; } +sub class_of { + return unless defined $_[0]; + my $class = blessed($_[0]) || $_[0]; + return Mouse::Meta::Class::get_metaclass_by_name($class); +} + 1; __END__ @@ -446,7 +452,9 @@ with plenty of code borrowed from L and L =head1 BUGS -No known bugs. +There is a known issue with Mouse on 5.6.2 regarding the @ISA tests. Until +this is resolve the minimum version of Perl for Mouse is set to 5.8.0. Patches +to resolve these tests are more than welcome. Please report any bugs through RT: email C, or browse