X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2Fopen.pm;h=d384b419c82a012216a00b64aa230b13b1823fa1;hb=8b503b1a8d84e235d4f8455dd10d4d928b5a89e1;hp=24488e6716fabb660eec949e93a88de65f8591a9;hpb=9fe371da3bdc2d1a5eae907101756f87eb5d2168;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/open.pm b/lib/open.pm index 24488e6..d384b41 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -1,6 +1,5 @@ package open; use warnings; -$open::hint_bits = 0x20000; # HINT_LOCALIZE_HH our $VERSION = '1.05'; @@ -57,7 +56,6 @@ sub import { my ($class,@args) = @_; croak("open: needs explicit list of PerlIO layers") unless @args; my $std; - $^H |= $open::hint_bits; my ($in,$out) = split(/\0/,(${^OPEN} || "\0"), -1); while (@args) { my $type = shift(@args); @@ -169,9 +167,8 @@ The C pragma serves as one of the interfaces to declare default "layers" (also known as "disciplines") for all I/O. Any two-argument open(), readpipe() (aka qx//) and similar operators found within the lexical scope of this pragma will use the declared defaults. -Three-argument opens are not affected by this pragma since there you -(can) explicitly specify the layers and are supposed to know what you -are doing. +Even three-argument opens may be affected by this pragma +when they don't specify IO layers in MODE. With the C subpragma you can declare the default layers of input streams, and with the C subpragma you can declare @@ -180,7 +177,7 @@ you can control both input and output streams simultaneously. If you have a legacy encoding, you can use the C<:encoding(...)> tag. -if you want to set your encoding layers based on your +If you want to set your encoding layers based on your locale environment variables, you can use the C<:locale> tag. For example: