From: Frank Lichtenheld Date: Mon, 20 Feb 2006 15:05:34 +0000 (+0000) Subject: Fix handling of parameters when more than one replace pattern has X-Git-Tag: switch-to-templates~103 X-Git-Url: https://git.deb.at/w?a=commitdiff_plain;h=c863d530229051bd598a389a968c5dd2f24ba4c5;p=deb%2Fpackages.git Fix handling of parameters when more than one replace pattern has been given --- diff --git a/lib/Packages/Search.pm b/lib/Packages/Search.pm index c0555e2..1851c83 100644 --- a/lib/Packages/Search.pm +++ b/lib/Packages/Search.pm @@ -134,9 +134,10 @@ sub parse_params { my @p_value_no_replace = @p_value; if ($params{$param}{replace} && @p_value) { - @p_value = (); foreach my $pattern (keys %{$params{$param}{replace}}) { - foreach (@p_value_no_replace) { + my @p_value_tmp = @p_value; + @p_value = (); + foreach (@p_value_tmp) { if ($_ eq $pattern) { my $replacement = $params{$param}{replace}{$_}; if (ref $replacement) {