From 16f34026da8fa705ed489dbaf7e2094c910eaa14 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 5 Aug 2017 20:15:15 -0700 Subject: [PATCH] Add ability to clear DualIndexHashObject --- PBot/DualIndexHashObject.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PBot/DualIndexHashObject.pm b/PBot/DualIndexHashObject.pm index d52d3cad..7d20a0bb 100644 --- a/PBot/DualIndexHashObject.pm +++ b/PBot/DualIndexHashObject.pm @@ -152,6 +152,11 @@ sub save { close FILE; } +sub clear { + my $self = shift; + $self->{hash} = {}; +} + sub find_index { my $self = shift; my ($primary_index_key, $secondary_index_key) = map {lc} @_;