From: Marius Gavrilescu Date: Wed, 29 Jan 2014 10:14:21 +0000 (+0200) Subject: Fix deletion of hash elements in Gruntmaster::Data X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=fca420f851060bec9868968d8c52f9ded3f4ad1a;p=gruntmaster-page.git Fix deletion of hash elements in Gruntmaster::Data --- diff --git a/lib/Gruntmaster/Data.pm b/lib/Gruntmaster/Data.pm index 1ca7958..eaa96c5 100644 --- a/lib/Gruntmaster/Data.pm +++ b/lib/Gruntmaster/Data.pm @@ -17,7 +17,7 @@ sub dynsub{ } BEGIN { - for my $cmd (qw/multi exec smembers get hget hdel hset sadd srem incr hmset hsetnx publish/) { + for my $cmd (qw/multi exec smembers get hget hdel hset sadd srem incr hmset hsetnx publish del/) { dynsub uc $cmd, sub { $redis->$cmd(@_) }; } @@ -65,6 +65,7 @@ sub defhash{ dynsub "remove_$name", sub (_) { my $key = shift; SREM cp . $name, $key; + DEL cp . "$name.$key"; }; dynsub "push_$name", sub {