Subject: | Set Default Answer in prompt() in Makefile.PL to Allow Automated Tests |
Dear Andy Murren,
Hi. This is imacat from Taiwan. I'm currently helping to run smoke
tests for CPAN modules. I found that the Makefile.PL of CGI-WML-0.09
goes into infinite loop if nothing is read from keyboard. I would
suggest that you set a safe default for prompt(), as suggested in the
ExtUtils::MakeMaker document, so that the it won't go into infinite loop.
<<ExtUtils::MakeMaker>>
Other Handy Functions
http://search.cpan.org/perldoc?ExtUtils::MakeMaker#Other_Handy_Functions
I made a simple patch to CGI-WML-0.09, 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: | CGI-WML-0.09-default.diff |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -u -r CGI-WML-0.09.orig/Makefile.PL CGI-WML-0.09/Makefile.PL
- --- CGI-WML-0.09.orig/Makefile.PL 2003-02-21 21:27:27.000000000 +0800
+++ CGI-WML-0.09/Makefile.PL 2008-03-30 00:21:48.000000000 +0800
@@ -22,7 +22,7 @@
THERE
;
while ($res !~ /^(y|n|q)/i) {
- - $res = prompt("Remove XML::Parser dependency? [Yes/No/Quit]:");
+ $res = prompt("Remove XML::Parser dependency? [Yes/No/Quit]:", "n");
}
exit(1) if ($res =~ /^q/i);
if ($res =~ /n/) {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkfubLkACgkQi9gubzC5S1y2iQCaAtwqSpX3kRCeHfuc7SqOTmba
HuQAn32OsIVBmYJpSrY+9dC++0toxJys
=IoaY
-----END PGP SIGNATURE-----