projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
1397be4
)
Mouse::class_of
Shawn M Moore [Wed, 27 May 2009 00:10:19 +0000 (20:10 -0400)]
lib/Mouse.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse.pm
b/lib/Mouse.pm
index
9c880ee
..
22792c9
100644
(file)
--- a/
lib/Mouse.pm
+++ b/
lib/Mouse.pm
@@
-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__