On Tue, May 01, 2007 at 01:41:45PM -0400, Mark J. Reed wrote:
: On 5/1/07, Larry Wall <[EMAIL PROTECTED]> wrote:
: >The plan introduced in A06 was to leave $*('IN'|'OUT'|'ERR') bound
: >to stdin, stdout, and stderr (which can still be dickered with on
: >the POSIXy level, of course), and instead emulate p5's select(FH)
: >using a global variable $*DEFOUT for the default handle of print
: >(and now say as well).
: 
: What about the default handle for warn/die?  $*DEFERR?

Could certainly work it the same way.

: I think I prefer a more significant difference between the default
: targets and the POSIXy std* values that they are initialized to,  like
: the Ruby notion of using global variables initialized to named
: constants, e.g. $stderr starts out as equal to STDERR but can be
: reassigned...

Well, the question is, what does a subprocess get for fd(2) after
you do that?  I'd prefer to keep $*ERR nailed to fd(2) in general so
that modifying $*ERR actually changes the stderr of new subprocesses.
But that doesn't give you a method of indirection inside the current
process, so $*DEFERR would be a way to do that.  Forcing people
to use an explicit handle in that case would be another approach,
but certainly something like $*DEFERR would be kinder to embedding
systems that want to intercept such messages and log them.

Larry

Reply via email to