summaryrefslogtreecommitdiffstats
path: root/urpmf
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-07 08:54:36 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-07 08:54:36 +0000
commita6df7f2c386bf2d46c41bdc0e15e699753037819 (patch)
treee43b9a654e21c2870d73babfed2ec6d834ab7315 /urpmf
parente85b0f8a2dc0adf48cf875e9c95f973d698c5721 (diff)
downloadurpmi-a6df7f2c386bf2d46c41bdc0e15e699753037819.tar
urpmi-a6df7f2c386bf2d46c41bdc0e15e699753037819.tar.gz
urpmi-a6df7f2c386bf2d46c41bdc0e15e699753037819.tar.bz2
urpmi-a6df7f2c386bf2d46c41bdc0e15e699753037819.tar.xz
urpmi-a6df7f2c386bf2d46c41bdc0e15e699753037819.zip
use $s instead of $_, it's cleaner and same speed
Diffstat (limited to 'urpmf')
-rwxr-xr-xurpmf10
1 files changed, 4 insertions, 6 deletions
diff --git a/urpmf b/urpmf
index 55848de5..25dbeae1 100755
--- a/urpmf
+++ b/urpmf
@@ -146,10 +146,10 @@ my $sprintfargs = join(', ', map {
my $next_st = $multi ? 'next' : 'return 1';
my @inner = (
- "\$_ = sprintf(qq{$proto\\n}, $sprintfargs);",
- "$expr or $next_st;",
- $uniq ? ('$uniq{$_} and ' . $next_st . ';', '$uniq{$_} = 1;') : (),
- "print;",
+ "my \$s = sprintf(qq{$proto\\n}, $sprintfargs);",
+ "\$s =~ $expr or $next_st;",
+ $uniq ? ('$uniq{$s} and ' . $next_st . ';', '$uniq{$s} = 1;') : (),
+ 'print $s;',
);
if ($multi) {
@@ -160,12 +160,10 @@ if ($multi) {
);
}
-#- it would be nice to use "my $_" in this callback.
my $callback = join("\n",
"sub {",
(map { " $_" }
'my ($urpm, $pkg) = @_;',
- 'local *_;',
@inner,
'1;'),
"}");