Skip Menu |

This queue is for tickets about the Inline-Octave CPAN distribution.

Report information
The Basics
Id: 34486
Status: new
Priority: 0/
Queue: Inline-Octave

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

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



Subject: Use prompt() in Makefile.PL to Allow Automated Tests
Dear Andy Adler, Hi. This is imacat from Taiwan. I'm currently helping to run smoke tests for CPAN modules. I found that the Makefile.PL of Inline-Octave-0.22 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 Also, I would suggest you to exit() with 0 from the Makefile.PL if GNU Octave fails, as suggested by this article: <<Notes For CPAN Authors> "How can I stop getting FAIL reports for missing libraries or other non-Perl dependencies?" http://cpantest.grango.org/wiki/CPANAuthorNotes I made a simple patch to Inline-Octave-0.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: Inline-Octave-0.22-prompt.diff
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 diff -u -r Inline-Octave-0.22.orig/Makefile.PL Inline-Octave-0.22/Makefile.PL - --- Inline-Octave-0.22.orig/Makefile.PL 2005-03-08 06:36:40.000000000 +0800 +++ Inline-Octave-0.22/Makefile.PL 2008-03-28 03:02:58.000000000 +0800 @@ -24,17 +24,22 @@ while (not $octave_validated) { $octave_validated= 1 if `$octave -v` =~ /Octave, version ([2-9]\.\d+\.(\d+|cvs))/; my $octave_version= $1; + my $inp; if ($octave_validated) { print "Found GNU Octave interpreter:[$octave] (version $octave_version)\n"; - - print "Enter new executable path or <RETURN> to accept: "; + $inp = prompt("Enter new executable path or <RETURN> to accept: ", ""); } else { print "Unable to find GNU Octave interpreter at:[$octave]\n"; - - print "Please enter new path to executable: " ; + $inp = prompt("Please enter new path to executable: ", ""); } + chomp $inp; - - chomp( my $inp= <STDIN> ); + if (!$inp && !$octave_validated) { + print "Found no GNU Octave to continue.\n" ; + exit 0; + } if ($inp) { $octave_validated= 0; $octave= $inp; -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkfr774ACgkQi9gubzC5S1xxmQCgjSIoGyVl6zC42IJ5W+BnR/9i zgQAnjC9jIAJzMWJDHsJ5tBdbuSSC+9U =N5xk -----END PGP SIGNATURE-----