projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c7dfdf6
)
actually, don't just call random ->does methods we don't control
Jesse Luehrs [Wed, 20 Jul 2011 14:49:25 +0000 (09:49 -0500)]
lib/Moose/Util.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Moose/Util.pm
b/lib/Moose/Util.pm
index
da44827
..
63a4da5
100644
(file)
--- a/
lib/Moose/Util.pm
+++ b/
lib/Moose/Util.pm
@@
-44,7
+44,7
@@
sub find_meta { Class::MOP::class_of(@_) }
sub does_role {
my ($class_or_obj, $role) = @_;
- if (try { $class_or_obj->can('does') }) {
+ if (try { $class_or_obj->isa('Moose::Object') }) {
return $class_or_obj->does($role);
}