projects
/
p5sagit/Safe-Isa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Make ->does, ->DOES safe on old perls (RT#100866)
[p5sagit/Safe-Isa.git]
/
lib
/
Safe
/
Isa.pm
diff --git
a/lib/Safe/Isa.pm
b/lib/Safe/Isa.pm
index
47cfd3e
..
bdd93e5
100644
(file)
--- a/
lib/Safe/Isa.pm
+++ b/
lib/Safe/Isa.pm
@@
-15,6
+15,7
@@
our $_call_if_object = sub {
# we gratuitously break modules like Scalar::Defer, which would be
# un-perlish.
return unless blessed($obj);
+ return $obj->isa(@_) if lc($method) eq 'does' and not $obj->can($method);
return $obj->$method(@_);
};