From: Matt S Trout Date: Thu, 5 Dec 2013 01:53:40 +0000 (+0000) Subject: comment blessed use so people who fail at perl stop trying to break it X-Git-Tag: v1.000005~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3335392f5835f3396cccd906b7716ce02bb06c0;p=p5sagit%2FSafe-Isa.git comment blessed use so people who fail at perl stop trying to break it --- diff --git a/Changes b/Changes index 687ab37..d1fb2e0 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Revision history for Safe-Isa + - comment blessed use so people who don't know perl stop trying to break it + 1.000004 2013-09-18 - fixed slightly mangled metadata from last release diff --git a/lib/Safe/Isa.pm b/lib/Safe/Isa.pm index a42566f..81d2281 100644 --- a/lib/Safe/Isa.pm +++ b/lib/Safe/Isa.pm @@ -11,6 +11,9 @@ our @EXPORT = qw($_call_if_object $_isa $_can $_does $_DOES); our $_call_if_object = sub { my ($obj, $method) = (shift, shift); + # This is intentionally a truth test, not a defined test, otherwise + # we gratuitously break modules like Scalar::Defer, which would be + # un-perlish. return unless blessed($obj); return $obj->$method(@_); };