Skip Menu |

This queue is for tickets about the Apache-AppCluster CPAN distribution.

Report information
The Basics
Id: 35105
Status: new
Priority: 0/
Queue: Apache-AppCluster

People
Owner: Nobody in particular
Requestors: imacat [...] mail.imacat.idv.tw
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Use prompt() in Makefile.PL to Allow Automated Tests
Dear Mark D. Maunder, Hi. This is imacat from Taiwan. I found that the Makefile.PL of your Apache-AppCluster-0.02 goes into an infinite loop if nothing is read from keyboard. I would suggest that you use prompt() instead of directly obtain input from the STDIN, as suggested in the ExtUtils::MakeMaker document, so that the it won't go into an infinite loop. <<ExtUtils::MakeMaker>> Other Handy Functions http://search.cpan.org/perldoc?ExtUtils::MakeMaker#Other_Handy_Functions I made a simple patch against Apache-AppCluster-0.02, in the hope that it helps. Please tell me if you have any question, or if I could be of any help. Thank you.
Subject: Apache-AppCluster-0.02-prompt.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Apache-AppCluster-0.02.orig/Server/t/lib/Apache/test.pm Apache-AppCluster-0.02/Server/t/lib/Apache/test.pm - --- Apache-AppCluster-0.02.orig/Server/t/lib/Apache/test.pm 2002-01-06 04:06:34.000000000 +0800 +++ Apache-AppCluster-0.02/Server/t/lib/Apache/test.pm 2008-04-16 14:16:17.000000000 +0800 @@ -5,6 +5,7 @@ use Exporter (); use Config; use FileHandle (); +use ExtUtils::MakeMaker; *import = \&Exporter::import; @EXPORT = qw(test fetch simple_fetch have_module skip_test @@ -92,9 +93,9 @@ my $skip = defined $canskip ? " ('$canskip' to skip)" : ''; my $response; do { - - print "$prompt [$default]$skip: "; - - chomp($response = <STDIN>); - - $response ||= $default; + $response = prompt("$prompt $skip:", $default); + $response = $canskip + if $mustfind && defined $canskip && $response eq $default && !-e $response; } until (!$mustfind || ($response eq $canskip) || (-e $response || !print("$response not found\n"))); return $response; -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkgFmhsACgkQi9gubzC5S1z29wCfbOTMp8ThPq7vpTJvgB7Gx4gb y1AAnineEgHo2m4pgPDG4sDrB2BmlwXC =CkSY -----END PGP SIGNATURE-----