Skip Menu |

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

Report information
The Basics
Id: 34604
Status: new
Priority: 0/
Queue: Apache-Filter

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

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



Subject: Use prompt() in Makefile.PL to Allow Automated Tests
Dear Ken Williams, Hi. This is imacat from Taiwan. I found that the Makefile.PL of Apache-Filter-1.024 goes into 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 infinite loop. <<ExtUtils::MakeMaker>> Other Handy Functions http://search.cpan.org/perldoc?ExtUtils::MakeMaker#Other_Handy_Functions I made a simple patch to Apache-Filter-1.024, 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-Filter-1.024-prompt.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Apache-Filter-1.024.orig/t/lib/Apache/test.pm Apache-Filter-1.024/t/lib/Apache/test.pm - --- Apache-Filter-1.024.orig/t/lib/Apache/test.pm 2005-09-25 11:02:52.000000000 +0800 +++ Apache-Filter-1.024/t/lib/Apache/test.pm 2008-04-02 07:10:04.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 @@ -93,9 +94,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) iEYEARECAAYFAkfywPwACgkQi9gubzC5S1xEXgCfeSqUY1iS25lGsddsXvq7Qg1p v/cAniCNQldX9SCi6Vb5Cz49IqwFI/b/ =ymBx -----END PGP SIGNATURE-----