diff options
author | Karl Berry <karl@freefriends.org> | 2012-11-20 18:08:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-11-20 18:08:54 +0000 |
commit | c5add2ea5067382269ae6f19e345fda0b9a7bd21 (patch) | |
tree | 02f512fda46d93079c9dc59c0d76f0e398150f83 /Master/tlpkg/tlperl/lib/open.pm | |
parent | 6c35e87bdc5a3f64833dbbc42e7d42e683db9d5b (diff) |
perl 5.16.2, compiled without optimization for Windows (from siep)
git-svn-id: svn://tug.org/texlive/trunk@28315 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/open.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/open.pm | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Master/tlpkg/tlperl/lib/open.pm b/Master/tlpkg/tlperl/lib/open.pm index 1bfe0d68330..fd22e1b9e71 100644 --- a/Master/tlpkg/tlperl/lib/open.pm +++ b/Master/tlpkg/tlperl/lib/open.pm @@ -1,7 +1,7 @@ package open; use warnings; -our $VERSION = '1.08'; +our $VERSION = '1.10'; require 5.008001; # for PerlIO::get_layers() @@ -95,16 +95,22 @@ sub import { } } if ($type eq 'IN') { - _drop_oldenc(*STDIN, @val); + _drop_oldenc(*STDIN, @val) if $std; $in = join(' ', @val); } elsif ($type eq 'OUT') { - _drop_oldenc(*STDOUT, @val); + if ($std) { + _drop_oldenc(*STDOUT, @val); + _drop_oldenc(*STDERR, @val); + } $out = join(' ', @val); } elsif ($type eq 'IO') { - _drop_oldenc(*STDIN, @val); - _drop_oldenc(*STDOUT, @val); + if ($std) { + _drop_oldenc(*STDIN, @val); + _drop_oldenc(*STDOUT, @val); + _drop_oldenc(*STDERR, @val); + } $in = $out = join(' ', @val); } else { @@ -207,7 +213,9 @@ many encodings have several aliases. See L<Encode::Supported> for details and the list of supported locales. When open() is given an explicit list of layers (with the three-arg -syntax), they override the list declared using this pragma. +syntax), they override the list declared using this pragma. open() can +also be given a single colon (:) for a layer name, to override this pragma +and use the default (C<:raw> on Unix, C<:crlf> on Windows). The C<:std> subpragma on its own has no effect, but if combined with the C<:utf8> or C<:encoding> subpragmas, it converts the standard |