package open;
use warnings;
use Carp;
-$open::hint_bits = 0x20000;
+$open::hint_bits = 0x20000; # HINT_LOCALIZE_HH
our $VERSION = '1.01';
} elsif ($ENV{LANG} =~ /^([^.]+)\.([^.]+)$/) {
($country_language, $locale_encoding) = ($1, $2);
}
+ # LANGUAGE affects only LC_MESSAGES only on glibc
} elsif (not $locale_encoding) {
if ($ENV{LC_ALL} =~ /\butf-?8\b/i ||
$ENV{LANG} =~ /\butf-?8\b/i) {
default).
The C<open> pragma serves as one of the interfaces to declare default
-"layers" for all I/O.
-
-The C<open> pragma is used to declare one or more default layers for
-I/O operations. Any open(), readpipe() (aka qx//) and similar
-operators found within the lexical scope of this pragma will use the
-declared defaults.
+"layers" (also known as "disciplines") for all I/O. Any open(),
+readpipe() (aka qx//) and similar operators found within the lexical
+scope of this pragma will use the declared defaults.
With the C<IN> subpragma you can declare the default layers
of input streams, and with the C<OUT> subpragma you can declare
=back
-If your locale environment variables (LANGUAGE, LC_ALL, LC_CTYPE, LANG)
+If your locale environment variables (LC_ALL, LC_CTYPE, LANG)
contain the strings 'UTF-8' or 'UTF8' (case-insensitive matching),
the default encoding of your STDIN, STDOUT, and STDERR, and of
B<any subsequent file open>, is UTF-8.