aboutsummaryrefslogtreecommitdiffstats
path: root/misc/config/code/modloop.pl
diff options
context:
space:
mode:
authorlloyd <[email protected]>2006-06-03 05:58:02 +0000
committerlloyd <[email protected]>2006-06-03 05:58:02 +0000
commite321ef1ed76cd0e4ce90734cd7b5b7bd764646bd (patch)
tree19c0825f124e758fe3a5f76710b94c49ee0545de /misc/config/code/modloop.pl
parentf6364c81754f95172d098cbefe3c33321bc6d99c (diff)
Move the configure.pl generation code into the tree.
Diffstat (limited to 'misc/config/code/modloop.pl')
-rw-r--r--misc/config/code/modloop.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/misc/config/code/modloop.pl b/misc/config/code/modloop.pl
new file mode 100644
index 000000000..09d0130ae
--- /dev/null
+++ b/misc/config/code/modloop.pl
@@ -0,0 +1,18 @@
+sub get_modules_list
+ {
+ my $MOD_DIR = $_[0];
+ my $dir = new DirHandle $MOD_DIR;
+ if(!defined $dir) { return (); }
+
+ my %MODULES;
+
+ while(defined($_ = $dir->read))
+ {
+ next if($_ eq '.' or $_ eq '..');
+ my $MODULE = $_;
+ my %modinfo = get_module_info($MODULE, $MOD_DIR);
+ foreach (keys %modinfo) { $MODULES{$MODULE}{$_} = $modinfo{$_}; }
+ }
+ return %MODULES;
+ }
+