From d2a70455175fd164ebf8f6ac2f7574d1711f56d1 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 13 Oct 2005 15:01:52 +0000 Subject: Don't use the same variable names in generated code and in generating code, dammit --- urpmf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'urpmf') diff --git a/urpmf b/urpmf index b6dbaa3d..253a3843 100755 --- a/urpmf +++ b/urpmf @@ -104,7 +104,7 @@ foreach (scalar(grep { defined $_ } values %params)) { #- build the callback matching the expression. my $callback = 'sub { my ($urpm, $pkg) = @_; '; #- it is a good start for a sub, no ;-) -foreach (qw( +foreach my $tag (qw( buildhost conflicts description @@ -122,11 +122,11 @@ foreach (qw( summary url )) { - if ($params{$_}) { - my $fi = $_ eq 'media' ? '$urpm::currentmedia->{name}' : '$pkg->'.$_; + if ($params{$tag}) { + my $fi = $tag eq 'media' ? '$urpm::currentmedia->{name}' : '$pkg->'.$tag; $callback .= ' foreach my $e ('.$fi.') { - local $_ = $pkg->'.$full.'name."'.(!$quiet && ":$_").':$e"; + local $_ = $pkg->'.$full.'name."'.(!$quiet && ":$tag").':$e"; '.$expr.' or next; '.($uniq && 'exists $uniq{$_} and next; $uniq{$_} = undef; ').'print "$_\n"; -- cgit v1.2.1