Subject: | Use prompt() in Makefile.PL to Allow Automated Tests |
Dear Sam Horrocks,
Hi. This is imacat from Taiwan. I found that I cannot read your
prompt when I try to test or install PersistentPerl-2.22 from the CPAN
shell. I would suggest that you use prompt() instead of directly print
your prompt and obtain input from the STDIN, as suggested in the
ExtUtils::MakeMaker document, so that CPAN can handle it.
<<ExtUtils::MakeMaker>>
Other Handy Functions
http://search.cpan.org/perldoc?ExtUtils::MakeMaker#Other_Handy_Functions
I made a simple patch to PersistentPerl-2.22, 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: | PersistentPerl-2.22-prompt.diff |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -u -r PersistentPerl-2.22.orig/Makefile.PL PersistentPerl-2.22/Makefile.PL
- --- PersistentPerl-2.22.orig/Makefile.PL 2003-10-12 12:48:46.000000000 +0800
+++ PersistentPerl-2.22/Makefile.PL 2008-04-14 02:25:51.000000000 +0800
@@ -16,12 +16,12 @@
support, and additional Apache configuration.
END
- -print "Compile mod_persistentperl (default no)? ";
+my $answer = prompt("Compile mod_persistentperl?", "N");
my @dirs = qw(src perperl_backend perperl);
my $macro = $write_makefile_common{macro};
my $apache_module = 0;
- -if (<STDIN> =~ /y/i) {
+if ($answer =~ /y/i) {
die "ERROR: Command 'apxs -q CC' failed.\n"
unless $macro->{APACHE_APXS_WORKS};
print "Compiling for Apache version $macro->{APACHE_VERSION}\n";
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkgCUD4ACgkQi9gubzC5S1wCogCeIWCIroirv/yMR5rJYQ0eHL4M
ofEAoI7PV3759N/DV0C88Ta45RhPMy5w
=JzX0
-----END PGP SIGNATURE-----