projects
/
gitmo/Class-MOP.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
d766878
)
Handle undef without warnings in class_of
Dave Rolsky [Sun, 5 Apr 2009 21:15:40 +0000 (16:15 -0500)]
lib/Class/MOP.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Class/MOP.pm
b/lib/Class/MOP.pm
index
ab68861
..
6fd22a6
100644
(file)
--- a/
lib/Class/MOP.pm
+++ b/
lib/Class/MOP.pm
@@
-62,6
+62,7
@@
XSLoader::load( __PACKAGE__, $XS_VERSION );
# This handles instances as well as class names
sub class_of {
+ return unless defined $_[0];
my $class = blessed($_[0]) || $_[0];
return $METAS{$class};
}