2011-09-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+ tap/perl: be more portable to older perl versions
+ * lib/tap-driver.pl (trap_perl_warnings_and_errors): Do not use
+ the three-args version of the `open' builtin, it is not well
+ supported by older perl versions (at least perl 5.6.2).
+ (start): Add a no-op statement to pacify a "possible typo ... used
+ only once" perl warning.
+
+2011-09-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
tap/perl: be more portable to older TAP::Parser versions
* lib/tap-driver.pl (start): Do not call the `ignore_exit' method
on our TAP parser: it is not supported in older TAP::Parser
{
# Be sure to send the warning/error message to the original stderr
# (presumably the console), not into the log file.
- open STDERR, ">&", \*OLDERR;
+ open STDERR, ">&OLDERR";
die @_;
}
}
open LOG, ">", $log_file or die "$ME: opening $log_file: $!\n";
open OLDOUT, ">&STDOUT" or die "$ME: duplicating stdout: $!\n";
open OLDERR, ">&STDERR" or die "$ME: duplicating stdout: $!\n";
+ *OLDERR = *OLDERR; # To pacify a "used only once" warning.
trap_perl_warnings_and_errors;
open STDOUT, ">&LOG" or die "$ME: redirecting stdout: $!\n";
open STDERR, ">&LOG" or die "$ME: redirecting stderr: $!\n";