From: Karen Etheridge Date: Thu, 21 Sep 2017 23:32:05 +0000 (-0700) Subject: keep namespace cleaner: don't import blessed() X-Git-Tag: v1.000007~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=29153068c976a3dacb2d9440a2ab1f5286a299d1;p=p5sagit%2FSafe-Isa.git keep namespace cleaner: don't import blessed() --- diff --git a/lib/Safe/Isa.pm b/lib/Safe/Isa.pm index 206e1da..2f4f357 100644 --- a/lib/Safe/Isa.pm +++ b/lib/Safe/Isa.pm @@ -2,7 +2,7 @@ package Safe::Isa; use strict; use warnings FATAL => 'all'; -use Scalar::Util qw(blessed); +use Scalar::Util (); use Exporter 5.57 qw(import); our $VERSION = '1.000006'; @@ -14,7 +14,7 @@ our $_call_if_object = sub { # 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 unless Scalar::Util::blessed($obj); return $obj->isa(@_) if lc($method) eq 'does' and not $obj->can($method); return $obj->$method(@_); };