Hello,
Show quoted text> If you don't yet have Apache installed you can build Apache against
> the Apache source code, but you won't be able to run the test suite (a
> very important step). Therefore you may want to install Apache before
> proceeding.
I am (resp. was) running a unattended CPAN smoke tester without Apache.
Show quoted text> Please provide a full path to 'apxs' executable
> (press Enter if you don't have it installed):
>
>
> Are you saying that this just loops endlessly?
Yes:
lib/Apache/TestConfig.pm
sub _custom_config_prompt_path {
my($wanted, $rh_choices, $optional) = @_;
my $ans;
my $default = '';
my $optional_str = $optional ? " (optional)" : '';
my $prompt =
"\nPlease provide a full path to$optional_str '$wanted'
executable";
my @choices = ();
if (%$rh_choices) {
$prompt .= " or choose from the following options:\n\n";
my $c = 0;
for (sort keys %$rh_choices) {
$c++;
$prompt .= " [$c] $_\n";
push @choices, $_;
}
$prompt .= " \n";
$default = 1; # a wild guess
}
else {
$prompt .= ":\n\n";
}
while (1) {
$ans = ExtUtils::MakeMaker::prompt($prompt, $default);
# strip leading/closing spaces
$ans =~ s/^\s*|\s*$//g;
# convert the item number to the path
if ($ans =~ /^(\d+)$/) {
if ($1 > 0 and $choices[$1-1]) {
$ans = $choices[$1-1];
}
else {
warn "The choice '$ans' doesn't exist\n";
next;
}
}
...
This will never stop even if there is no terminal connected.
ExtUtils::MakeMaker::prompt knows to do the correct thing and does just
return the default when the script is run unattended. The routine should
either detect that it is run unattended and skip the question or have a
bailout after (say) 10 identically answered but unsatisfactory answers,
or it should just ask once, insteqad of diving into a potentially
infinite loop unattended.
Thanks for looking after this,
-max