Subject: | fix warning in Tie::Redis and broken test ./t/02.hash.t |
Hi there,
here is a patch to fix the test ./t/02.hash.t and the warning 'Use of uninitialized value $serialize
in hash element'.
--
Boris
Subject: | tie-redis.patch |
diff --git a/lib/Tie/Redis.pm b/lib/Tie/Redis.pm
index 500a2e1..99f8339 100644
--- a/lib/Tie/Redis.pm
+++ b/lib/Tie/Redis.pm
@@ -45,7 +45,7 @@ sub _serializer {
],
);
- my $serializer = $serializers{$serialize} || [undef, (sub {
+ my $serializer = $serializers{$serialize || ''} || [undef, (sub {
Carp::croak("No serializer specified for Tie::Redis; unable to handle nested structures");
}) x 2];
diff --git a/t/02.hash.t b/t/02.hash.t
index c6b00e2..f734f70 100644
--- a/t/02.hash.t
+++ b/t/02.hash.t
@@ -1,5 +1,6 @@
-use Test::More;
+use Test::More tests => 4;
use t::Redis;
+use Tie::Redis;
test_redis {
my($port) = @_;