From e038729f9aa69d288627a9046d41bd31efdd4e5c Mon Sep 17 00:00:00 2001 From: Dan Book Date: Mon, 23 Mar 2020 18:30:41 -0400 Subject: perlvar - expand and link to ${^OPEN} documentation --- pod/perlvar.pod | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'pod/perlvar.pod') diff --git a/pod/perlvar.pod b/pod/perlvar.pod index 2b7a683a41..1d04f532f7 100644 --- a/pod/perlvar.pod +++ b/pod/perlvar.pod @@ -2255,10 +2255,30 @@ This variable was added in Perl v5.6.0. =item ${^OPEN} X<${^OPEN}> -An internal variable used by PerlIO. A string in two parts, separated +An internal variable used by L. A string in two parts, separated by a C<\0> byte, the first part describes the input layers, the second part describes the output layers. +This is the mechanism that applies the lexical effects of the L +pragma, and the main program scope effects of the C or C options +for the L<-C command-line switch|perlrun/-C [Ilist>]> and +L. + +The functions C, C, C, C (as well +as the related C and C<`STRING`> operators), C, +C, and C are affected by the lexical value of +this variable. The implicit L handle opened by C (or +the related C<< <> >> and C<<< <<>> >>> operators) on passed filenames is +also affected (but not if it opens C). If this variable is not +set, these functions will set the default layers as described in +L. + +C ignores this variable (and the default layers) when called with +3 arguments and explicit layers are specified. Indirect calls to these +functions via modules like L are not affected as they occur +in a different lexical scope. Directory handles such as opened by +C are not currently affected. + This variable was added in Perl v5.8.0. =item $PERLDB -- cgit v1.2.1