From 13509c09b109518f6511d6adc4b8b86f495a8d78 Mon Sep 17 00:00:00 2001 From: Rob Emery Date: Mon, 9 May 2016 20:33:02 +0100 Subject: [PATCH] Conversions: Not sure why I was looking up the value everytime from the hash here --- lib/DDG/Goodie/Conversions.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/DDG/Goodie/Conversions.pm b/lib/DDG/Goodie/Conversions.pm index bd46ca912..a53d658aa 100755 --- a/lib/DDG/Goodie/Conversions.pm +++ b/lib/DDG/Goodie/Conversions.pm @@ -190,11 +190,11 @@ handle query_lc => sub { }; sub looks_plural { - my ($unit) = @_; + my ($input) = @_; my $is_plural = 0; - foreach my $x (keys(%plurals)) { - $is_plural = 1 if(lc($plurals{$x}) eq lc($unit)); + foreach my $x (values(%plurals)) { + $is_plural = 1 if(lc($x) eq lc($input)); } return $is_plural;