Bugs bei formatierten Methoden behoben
[kivitendo-erp.git] / SL / Controller / Helper / ParseFilter.pm
index 61b819c..3bf1b65 100644 (file)
@@ -22,7 +22,10 @@ my %filters = (
 my %methods = (
   enable => sub { ;;;; },
   map {
-    $_   => sub { +{ $_    => $_[0] } },
+    # since $_ is an alias it can't be used in a closure. even "".$_ or "$_"
+    # does not work, we need a real copy.
+    my $_copy = "$_";
+    $_   => sub { +{ $_copy    => $_[0] } },
   } qw(similar match imatch regex regexp like ilike rlike is is_not ne eq lt gt le ge),
 );