aboutsummaryrefslogtreecommitdiffstats
path: root/configure.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-28 19:09:14 +0000
committerlloyd <[email protected]>2008-09-28 19:09:14 +0000
commitbef0691be422ede9ae6ad51a8e3ff238110d3eb2 (patch)
tree34b2c5ff254483c0c2fd53c065d86f1e3ba5d728 /configure.pl
parentf84a0cd99c4576106345078acfe16a980eecac6e (diff)
Use File::Find instead of a glob, to find modinfo.txt in any directory
inside modules
Diffstat (limited to 'configure.pl')
-rwxr-xr-xconfigure.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/configure.pl b/configure.pl
index dc67adca3..6b331adf0 100755
--- a/configure.pl
+++ b/configure.pl
@@ -8,6 +8,7 @@ use Config;
use Getopt::Long;
use File::Spec;
use File::Copy;
+use File::Find;
use Sys::Hostname;
my $MAJOR_VERSION = 1;
@@ -419,6 +420,8 @@ sub autoload_modules {
foreach my $mod (sort keys %MODULES) {
my %modinfo = %{ $MODULES{$mod} };
+ trace("Loading $mod");
+
my $realname = $modinfo{'realname'};
if(defined($$config{'modules'}{$mod})) {
@@ -1358,7 +1361,20 @@ sub read_module_files {
my $mod_dir = $$config{'mods-dir'};
my %allinfo;
- foreach my $modfile (glob("modules/*/*/modinfo.txt")) {
+
+ my @modinfos;
+
+ File::Find::find(
+ { wanted => sub
+ { if(-f $_ && /^modinfo\.txt\z/s) {
+ my $name = $File::Find::name;
+ push @modinfos, $name;
+ }
+ }
+ },
+ $mod_dir);
+
+ foreach my $modfile (@modinfos) {
trace("reading $modfile");
my ($volume,$dirs,$file) = File::Spec->splitpath($modfile);