develooper Front page | perl.perl5.porters | Postings from September 2011

[perl #92728] pragma open handles STDERR improperly

Thread Next
From:
Father Chrysostomos via RT
Date:
September 11, 2011 16:29
Subject:
[perl #92728] pragma open handles STDERR improperly
Message ID:
rt-3.6.HEAD-31297-1315783758-853.92728-14-0@perl.org
On Sun Jun 19 12:20:09 2011, sprout wrote:
> On Mon Jun 13 05:04:49 2011, uhuruh@gmail.com wrote:
> > After the default PerlIO layer for STDIN/STDOUT/STDERR been set with
> > the :std subpragma, a second call to `use open ...' without :std will
> > undo the settings of STDIN and/or STDOUT, while leave STDERR
> > untouched.
> > The expected behavior is to treat STDERR the same way as to STDOUT.
> > 
> > Example code:
> > 
> > 1.  use open ':encoding(UTF-8)', ':std';
> > 2.  # the I/O layer of STDIN/STDOUT/STDERR is set to :encoding(UTF-8)
> > 3.  use open ':encoding(UTF-8)';
> > 4.  # layer :encoding(UTF-8) is dropped for STDOUT, but not for STDERR
> 
> While they should be treated the same way, are you sure it’s STDERR, and
> not STDIN/OUT, that’s buggy?
> 
> Doing anything with STD* handles without :std’s having been specified
> seems like a bug to me.

What do others think about this?


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About