in reply to Understanding compiletime vs. runtime
Your description of what is happening leads me to suspect that Mail::IMAPClient is just warning, which writes to STDERR (and therefore goes to foo.err) and leaves no trapped error (hence the "connected successfully" message).
If my suspicion is correct, then you can get what you want with the line:
so that warnings become dies and get caught like you expect.$SIG{__WARN__} = sub {die @_};
But note that if STDERR is being written to directly (eg with "print STDERR") then you'll have to put in a lot more effort.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Understanding compiletime vs. runtime
by punkish (Priest) on Feb 04, 2005 at 12:56 UTC | |
by tilly (Archbishop) on Feb 05, 2005 at 08:42 UTC | |
by punkish (Priest) on Feb 05, 2005 at 22:21 UTC | |
by tilly (Archbishop) on Feb 06, 2005 at 07:37 UTC |