I was thinking about configure and was wondering why we have to keep
everything all in one file. Why not create a config/ directory (or something
like that) and have a set of .cm files (ConfigureModule) that do the actual
work, using a helper module to do the grunt work. That way, to add a
configure question, I just write something like:
package Config::Quest;
use Config;
sub Configure {
$question = "what is your quest?"
$parrot = ask("quest",$question,'to find the holy parrot');
return $parrot;
}
The Configure.pl script then runs all the askQuestion subs in the Config::*
modules and writes the return values into the Makefile where it belongs.
Instead of returning, I could use die() to say:
die "IIEEEEEEEEEEEEE!\n";
If I find they don't have something required, etc
The API would have to be fleshed out a little more, but the basic idea
applies.
I realize that this would take some amount of work (and I am willing to
spend time on this), but I think it will give a more maintainable platform
for time to come.
Zach