Subject: | Use of uninitialized value in string eq at Sys/Syslog.pm line 631. |
Dear Sean Egan,
Hi. This is imacat from Taiwan. I'm currently helping to run smoke
tests for CPAN modules. I found that the Makefile.PL of
POE-Component-LaDBI-1.2.1 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
the required DBI::DSN 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 POE-Component-LaDBI-1.2.1, 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: | POE-Component-LaDBI-1.2.1-prompt.diff |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
diff -u -r POE-Component-LaDBI-1.2.1.orig/Makefile.PL POE-Component-LaDBI-1.2.1/Makefile.PL
- --- POE-Component-LaDBI-1.2.1.orig/Makefile.PL 2004-02-16 07:23:12.000000000 +0800
+++ POE-Component-LaDBI-1.2.1/Makefile.PL 2008-03-30 15:35:49.000000000 +0800
@@ -159,10 +159,7 @@
my ($question) = @_;
chomp $question;
while (1) {
- - print $question, " [Y/n] ";
- - my $ans = get_answer();
- - $ans =~ s/\s//g;
- - return 1 unless length($ans) > 0;
+ my $ans = prompt($question, "Y");
if ($ans =~ /^[Yy]/) {
return 1;
}
@@ -175,8 +172,7 @@
sub read_answer {
my ($prompt) = @_;
chomp $prompt;
- - print $prompt;
- - my $ans = get_answer();
+ my $ans = prompt($prompt);
$ans =~ s/^\s*//;
$ans =~ s/\s*$//;
return $ans;
@@ -187,10 +183,13 @@
chomp $prompt;
my ($ans);
while (!$ans) {
- - print $prompt;
- - $ans = get_answer();
+ $ans = prompt($prompt);
$ans =~ s/^\s*//;
$ans =~ s/\s*$//;
+ if (!$ans) {
+ print "Cannot continue\n";
+ exit 0;
+ }
}
return $ans;
}
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkfvQwgACgkQi9gubzC5S1zr+gCggl1kV1VWku48NNpomlpWrEWl
LU8AmgNoeN5vLgRM2xyd958nZm2mSkNK
=gRqW
-----END PGP SIGNATURE-----