]> git.ipfire.org Git - thirdparty/automake.git/commit
tap/perl: don't redirect perl warnings/errors to log files
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 25 Aug 2011 08:53:23 +0000 (10:53 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 25 Aug 2011 11:54:56 +0000 (13:54 +0200)
commitaba3010e83194e2172006059db08f4fd5992f021
treeb6a47a6a7a83e1f93d06de9d8e699592bb1c222f
parent3cb4cb584d97f56feb7247e9decec70a7d88212e
tap/perl: don't redirect perl warnings/errors to log files

With this change, the test `tap-driver-stderr.test' also passes
with the perl implementation of the TAP driver.

* lib/tap-driver.pl (start): Save the original stderr into the
`OLDERR' file handle, and call ...
(trap_perl_warnings_and_errors): ... this new function, trapping
the `__WARN__' and `__DIE__' "pseudo-signals" to ensure that the
warning and error messages goes to that original stderr stream.
Since we are at it, be sure to prepend all possible "die" message
with the name of the script as given by the `$ME' variable.
ChangeLog
lib/tap-driver.pl