[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Autom4te::General
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Autom4te::General |
Date: |
Mon, 02 Jun 2003 21:34:00 +0200 |
User-agent: |
Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.3 (gnu/linux) |
>>> "Russ" == Russ Allbery <address@hidden> writes:
Russ> Alexandre Duret-Lutz <address@hidden> writes:
>> Since my recent playing with Autoconf's handling of $? and $!, I'm
>> convinced that relying on `die' or other `Carp' friend to output
>> diagnostics is plain wrong. The only sane way to display an error is
>> 'print STDERR' + `exit'. This is what Channels.pm does.
Russ> That's also what die does, if the message ends in a newline.
I'm not talking about the formating, but about die's handling of
$!. Die is clearly designed to be called immediately after an
error from a function which updated $!. Any other attempt to
use die _must_ be protected with `$! = 0;', or `die' might reuse
an obsolete $! value from a former error (it's even worse: I
think the recent WEXITSTATUS issue was caused by Perl's
autoloading of WEXITSTATUS failing to preserve $!).
--
Alexandre Duret-Lutz
Re: Autom4te::General, Akim Demaille, 2003/06/02