Conversions: Not sure why I was looking up the value everytime from the hash here

master
Rob Emery 2016-05-09 20:33:02 +01:00
parent 9418f7baef
commit 13509c09b1
1 changed files with 3 additions and 3 deletions

View File

@ -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;