added missing module import to C4::ILSDI::Utility
[koha.git] / C4 / Matcher.pm
index 294c481..c9a1e46 100644 (file)
@@ -18,6 +18,8 @@ package C4::Matcher;
 # Suite 330, Boston, MA  02111-1307 USA
 
 use strict;
+use warnings;
+
 use C4::Context;
 use MARC::Record;
 use C4::Search;
@@ -788,7 +790,7 @@ sub _get_match_keys {
                 $key = _normalize($key);
                 if ($component->{'length'}){
                    if (length($key) > $component->{'length'}){
-                     $key = _normalize(substr($key,$component->{'offset'},$component{'length'}));
+                     $key = _normalize(substr($key,$component->{'offset'},$component->{'length'}));
                    }
                 }
             }
@@ -820,7 +822,7 @@ sub _parse_match_component {
 # FIXME - default normalizer
 sub _normalize {
     my $value = uc shift;
-    $value =~ s/.;:,\]\[\)\(\/'"//g;
+    $value =~ s/[.;:,\]\[\)\(\/'"]//g;
     $value =~ s/^\s+//;
     #$value =~ s/^\s+$//;
     $value =~ s/\s+$//;