Skip Menu |

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

Report information
The Basics
Id: 35104
Status: resolved
Priority: 0/
Queue: Apache-JemplateFilter

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

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



Subject: Use prompt() in Makefile.PL to Allow Automated Tests
Dear FUJIWARA Shunichiro, Hi. This is imacat from Taiwan. I found that the Makefile.PL of your Apache-JemplateFilter-0.01 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-JemplateFilter-0.01, 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-JemplateFilter-0.01-prompt.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Apache-JemplateFilter-0.01.orig/t/lib/Apache/test.pm Apache-JemplateFilter-0.01/t/lib/Apache/test.pm - --- Apache-JemplateFilter-0.01.orig/t/lib/Apache/test.pm 2005-09-25 11:02:52.000000000 +0800 +++ Apache-JemplateFilter-0.01/t/lib/Apache/test.pm 2008-04-16 14:08:01.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) iEYEARECAAYFAkgFl9UACgkQi9gubzC5S1wPuQCgklIwQ/TNbg6WxfLM1JHrS/Xk DRYAnjXceKgLulY/9XoJ8K+CyMNWElUP =D+fw -----END PGP SIGNATURE-----
From: fujiwara.shunichiro [...] gmail.com
Thanks! patch applied, and version 0.02 released.
Thanks! patch applied, and version 0.02 released.