Subject: | [PATCH] Test failure fix |
failed on 5.18, 5.20
--- Makefile.PL
+++ Makefile.PL
@@ -14,6 +14,9 @@ WriteMakefile(
MIME::Types => 0,
Data::Serializer => 0,
},
+ TEST_REQUIRES => {
+ Scalar::Util => 0,
+ },
ABSTRACT_FROM => 'lib/Email/MIME/CreateHTML.pm',
AUTHOR => 'British Broadcasting Corporation',
# We don't want to add to Email::MIME's docs, and don't have permission to anyway.
diff --git a/lib/Email/MIME/CreateHTML/Resolver.pm b/lib/Email/MIME/CreateHTML/Resolver.pm
index e5dd2b1..6f46cd4 100644
--- a/lib/Email/MIME/CreateHTML/Resolver.pm
+++ b/lib/Email/MIME/CreateHTML/Resolver.pm
@@ -9,6 +9,7 @@ package Email::MIME::CreateHTML::Resolver;
use strict;
use Carp;
+use Scalar::Util qw(blessed);
use vars qw($VERSION $HaveCache $HaveLWP $HaveFilesystem);
$VERSION = sprintf "%d.%03d", q$Revision: 1.5 $ =~ /: (\d+)\.(\d+)/;
@@ -49,7 +50,7 @@ sub new {
my $object_cache = $args->{'object_cache'};
if(defined $object_cache ) {
- confess "object_cache must be an object" unless ( UNIVERSAL::isa($object_cache,'UNIVERSAL') );
+ confess "object_cache must be an object" unless blessed $object_cache;
confess "object_cache does not seem to use the expected cache interface (get and set methods)"
unless ($object_cache->can('get') && $object_cache->can('set'));
warn("Caching support is not available - object_cache will not be used") unless($HaveCache);