UPD: The code works just fine on a newer Redis module version: 1.904 vs 1.2001.
I’m trying to use Redis module from CPAN. It works OK when setting/getting scalar keys, however, I can’t get hashes to work.
Here’s my sample program:
#!/usr/bin/perl -w
use strict;
use Redis;
my $red = Redis->new();
print "use\n";
$red->hmset(foo=>bar=>1, baz=>2);
print "set\n";
print "$_\n" for $red->hmget("foo", "bar", "baz");
And it hangs after printing “use”.
Just using hmset/get from redis-cli works fine.
What’s wrong with this code, and how should I deal with redis hashes from perl?
It turned out that the problem was in an old enough version of the Redis module. On another server the code I’ve posted worked as expected.
The versions in question are 1.904 (works) and 1.2001 (does not).