diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2006-11-07 08:54:36 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2006-11-07 08:54:36 +0000 |
commit | a6df7f2c386bf2d46c41bdc0e15e699753037819 (patch) | |
tree | e43b9a654e21c2870d73babfed2ec6d834ab7315 | |
parent | e85b0f8a2dc0adf48cf875e9c95f973d698c5721 (diff) | |
download | urpmi-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
-rwxr-xr-x | urpmf | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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;'), "}"); |