From fca420f851060bec9868968d8c52f9ded3f4ad1a Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Wed, 29 Jan 2014 12:14:21 +0200 Subject: [PATCH] Fix deletion of hash elements in Gruntmaster::Data --- lib/Gruntmaster/Data.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 { -- 2.39.2