Subject: | myld buglet |
RUDY/DBD-mysql-2.9002.tar.gz has a myld script that does not react sensibly on compile errors. Makeing the script strict clean immediately reveals the bug. The attached patch should be enough to fix it.
The symptom I had to fix was that the compilation complained about missing ssl library, but the myld script just returned the error status 1 and no error message. My patch fixes this.
--- DBD-mysql-2.9002-ak/myld Wed Jul 16 11:42:45 2003
+++ DBD-mysql-2.9002/myld Tue Mar 18 03:53:27 2003
@@ -4,18 +4,16 @@
# in the linking stage
#
-use strict;
open(OLDSTDERR, ">&STDERR") || die "Failed to backup STDERR: $!";
open(FILE, ">myld.stderr") || die "Failed to create myld.stderr: $!";
open(STDERR, ">&FILE") || die "Failed to redirect STDERR: $!";
-my $retval = system @ARGV;
+$retval = system @ARGV;
open(STDERR, ">&OLDSTDERR");
close(FILE) || die "Failed to close myld.stderr: $!";
-my $contents;
if (-f "myld.stderr" && !-z _) {
open(FILE, "<myld.stderr") || die "Failed to reopen myld.stderr: $!";
local $/ = undef;
- $contents = <FILE>;
+ my $contents = <FILE>;
die "Failed to read myld.stderr: $!" unless defined($contents);
close(FILE) || die "Failed to close myld.stderr: $!";