p5-RedisDB / RedisDB

Perl extension to access Redis
22 stars 11 forks source link

hmget is broken #21

Closed jprante closed 10 years ago

jprante commented 10 years ago

The hmget method is broken in 2.36

use RedisDB;
use Data::Dumper;
my $redis = RedisDB->new( host => 'localhost', port => 6379);
$redis->hset('test', '1', 'value1' );
$redis->hset('test', '2', 'value2' );
my @r = $redis->hmget('test2',  '1', '2' );
print Dumper @r;

Gives

$VAR1 = [
          undef,
          undef
        ];

hget works.

trinitum commented 10 years ago

Note, that you're setting 'test' but getting 'test2'

On Wed, May 21, 2014 at 5:43 PM, Jörg Prante notifications@github.comwrote:

The hmget method is broken in 2.36

use RedisDB; use Data::Dumper; my $redis = RedisDB->new( host => 'localhost', port => 6379); $redis->hset('test', '1', 'value1' ); $redis->hset('test', '2', 'value2' ); my @r = $redis->hmget('test2', '1', '2' ); print Dumper @r;

Gives

$VAR1 = [ undef, undef ];

hget works.

— Reply to this email directly or view it on GitHubhttps://github.com/trinitum/RedisDB/issues/21 .

jprante commented 10 years ago

Yes, it was just a typo.

Sorry.