I am trying to determine the purpose of a certain block of code in
Configure.pl. In the most recent version in trunk, we find:
if ( exists $args{step} ) {
$conf->data()->slurp();
$conf->runstep( $args{step} );
print "\n";
exit(0);
} else {
# Run the actual steps
$conf->runsteps or exit(1);
}
The 'else' block is what normally executes when you call 'perl
Configure.pl'. The 'if' block is what puzzles me. Translating it,
we say:
"If command-line option 'step' has been provided with a value such as
'foo', read in the configuration data already found in %
Parrot::Config::PConfig (that's what Parrot::Configure::Data::slurp()
does), then run step 'foo' (presumably to add it to the configuration
setup)."
My questions are:
1. If you've already configured, why would you want to add another
step before calling 'make'?
2. Does anybody actually use Configure.pl in this way, and to what
purpose?
3. Even granting that this is functionality someone finds useful,
wouldn't we be better off if we placed in a separate Perl script
focused strictly on supplementing/overriding aspect of a current
Parrot configuration?
After all, there are several functions called in Configure.pl's
normal operation -- print_introduction(); Parrot::Configure::new();
get_steps_list; print_conclusion() -- which you would probably *not*
want or need to run if you were doing supplementary configuration
because they've already been run during Configure.pl.
Since Parrot::Configure::runstep() -- as distinct from runsteps() and
_runstep() -- appears only to be called during Configure.pl,
answering these questions would help me in testing and refactoring.
Thank you very much.
kid51