On 5/1/07, Larry Wall <[EMAIL PROTECTED]> wrote:
: 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.

Ah.  I had imagined $*ERR as a bit more ephemeral than that, with an
underlying really-real stderr.

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.

Right.  Something akin to P5's $SIG{__WARN__} and $SIG{__DIE__} would
also work, but that never seemed to be quite the right way to do that,
to me.

--
Mark J. Reed <[EMAIL PROTECTED]>

Reply via email to