UnwashedCat has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a program using the Curses::Application module. One issue I've been noticing is that when a die() occurs and a message is sent to STDERR, I never see it. I'm pretty sure the reason for this is that the message is displayed before my Curses::Application object is destroyed, which restores the terminal to normal line buffering mode. While in curses mode, STDOUT and STDERR don't seem to work properly.
Right now I'm redirecting STDERR to a file, but that seems like a poor solution. Does anyone know of a way to 'store' messages to STDERR, and display them only AFTER the Curses::Application object is destroyed? Or maybe have a function that displays the error message in a dialog before closing down the program?
Thanks!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Saving STDERR and displaying it later
by jhourcle (Prior) on Jul 03, 2006 at 18:11 UTC | |
by UnwashedCat (Acolyte) on Jul 03, 2006 at 18:19 UTC | |
by leriksen (Curate) on Jul 03, 2006 at 23:43 UTC | |
Re: Saving STDERR and displaying it later
by ikegami (Patriarch) on Jul 04, 2006 at 01:10 UTC | |
Re: Saving STDERR and displaying it later
by GrandFather (Saint) on Jul 03, 2006 at 18:12 UTC | |
Re: Saving STDERR and displaying it later
by Hue-Bond (Priest) on Jul 03, 2006 at 18:12 UTC | |
by UnwashedCat (Acolyte) on Jul 03, 2006 at 18:21 UTC | |
by Hue-Bond (Priest) on Jul 03, 2006 at 18:28 UTC |