summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2006-11-10 09:44:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2006-11-10 09:44:08 +0000
commitddcac76b282e6da45f5905e7c8102ab259e27d44 (patch)
tree9e2471e7f9edcc4d6af860fee49db762adbda002 /urpm.pm
parent58f2b6fcf784c656f4b1ab29f548280ae15980d7 (diff)
downloadurpmi-ddcac76b282e6da45f5905e7c8102ab259e27d44.tar
urpmi-ddcac76b282e6da45f5905e7c8102ab259e27d44.tar.gz
urpmi-ddcac76b282e6da45f5905e7c8102ab259e27d44.tar.bz2
urpmi-ddcac76b282e6da45f5905e7c8102ab259e27d44.tar.xz
urpmi-ddcac76b282e6da45f5905e7c8102ab259e27d44.zip
use glob()
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm19
1 files changed, 7 insertions, 12 deletions
diff --git a/urpm.pm b/urpm.pm
index a2174d14..f07d4e4a 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -458,18 +458,13 @@ sub configure {
#- if a configuration option has been found, use it; else fatal error.
if ($parallel_options) {
foreach my $dir (grep { -d $_ } map { "$_/urpm" } @INC) {
- my $dh = $urpm->opendir_safe($dir);
- if ($dh) {
- local $_;
- while (defined ($_ = readdir $dh)) { #- load parallel modules
- /parallel.*\.pm$/ && -f "$dir/$_" or next;
- $urpm->{log}->(N("examining parallel handler in file [%s]", "$dir/$_"));
- # perl_checker: require urpm::parallel_ka_run
- # perl_checker: require urpm::parallel_ssh
- eval { require "$dir/$_"; $parallel_handler = $urpm->handle_parallel_options($parallel_options) };
- $parallel_handler and last;
- }
- closedir $dh;
+ foreach my $pm (grep { -f $_ } glob("$dir/parallel*.pm")) {
+ #- load parallel modules
+ $urpm->{log}->(N("examining parallel handler in file [%s]", $pm));
+ # perl_checker: require urpm::parallel_ka_run
+ # perl_checker: require urpm::parallel_ssh
+ eval { require $pm; $parallel_handler = $urpm->handle_parallel_options($parallel_options) };
+ $parallel_handler and last;
}
$parallel_handler and last;
}