Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Saving STDERR and displaying it later

by Hue-Bond (Priest)
on Jul 03, 2006 at 18:12 UTC ( [id://559030]=note: print w/replies, xml ) Need Help??


in reply to Saving STDERR and displaying it later

Can't you do:

{ my $old = select STDERR; $|++; select $old; }

?

--
David Serrano

Replies are listed 'Best First'.
Re^2: Saving STDERR and displaying it later
by UnwashedCat (Acolyte) on Jul 03, 2006 at 18:21 UTC
    Wouldn't that just cause output to STDERR to appear immediately? The problem is, any output to STDERR or STDOUT is lost while in curses mode, and curses mode is only left when my Curses::Application object is destroyed. A solution where output to STDERR is 'held' in the buffer indefinitely until allowed to leave (after the DESTROY method is called on the Curses::Application object) would do the trick.

      Ah, now I get it. I thought you were talking about program dying and you not getting STDERR output because of buffering.

      --
      David Serrano

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://559030]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-16 22:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found