perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [cpan #8418] Apache::Test Makefile enters infinite loop when running without a connected terminal
Date Sun, 14 Nov 2004 04:02:43 GMT
Philippe M. Chiasson wrote:
> Max Maischein via RT wrote:
>> This message about Apache-Test was sent to you by 
>> <> via
>> Full context and any attached attachments can be found at:
>> <URL: >
>> Hello,
>> the Apache::Test Makefile.PL enters an infinite loop when it is 
>> running without a connected terminal and can't find the path to httpd. 
>> This is very bad for CPAN testers who maybe don't have a httpd binary 
>> somewhere to be found, and where the testing runs unattended. Please 
>> use the prompt() function in ExtUtils::MakeMaker and don't enter a 
>> loop if the default is accepted, or detect that Makefile.PL is run in 
>> unattended mode and don't enter the loop at all.

for the future, this belongs to the httpd-test list, not here :)

> We are already using ExtUtils::MakeMaker::prompt(), but the problem is 
> that we don't quite
> handle non-console TTYs proprely and do indeed loop infinitely. Easy to 
> reproduce on a
> system without httpd/apxs
> Following patch fixes the problem for me.

-t STDOUT should work just as well, no need for \*. we already use that in

> +        if ((lc($ans) eq 'skip' || !-t \*STDIN) && !$optional) {
>              Apache::TestRun::skip_test_suite();
>              next; # in case they change their mind

>          my $ans = ExtUtils::MakeMaker::prompt($prompt, $default);
> -        return if lc($ans) =~ /no/;
> +        return if lc($ans) =~ /no/ && -t \*STDIN;
>      }

but why entering these functions at all, in the !-t mode? makes the logic 

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message