X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2FEncode%2Fencoding.pm;h=0aa5f0f635c2c07b38e4aaca807af0e35cde0a2d;hb=eb44fba69040ec68279582fa91f4aad4b40e82f1;hp=efa5f3113b267d81d2c32d3a14c2dd93438492e1;hpb=10c5ecbb45a6581439752935880506669f2d618c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/Encode/encoding.pm b/ext/Encode/encoding.pm index efa5f31..0aa5f0f 100644 --- a/ext/Encode/encoding.pm +++ b/ext/Encode/encoding.pm @@ -1,5 +1,5 @@ package encoding; -our $VERSION = do { my @r = (q$Revision: 1.34 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; +our $VERSION = do { my @r = (q$Revision: 1.35 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; use Encode; use strict; @@ -75,8 +75,13 @@ sub import { sub unimport{ no warnings; undef ${^ENCODING}; + if ($HAS_PERLIO){ + binmode(STDIN, ":raw"); + binmode(STDOUT, ":raw"); + }else{ binmode(STDIN); binmode(STDOUT); + } if ($INC{"Filter/Util/Call.pm"}){ eval { filter_del() }; } @@ -193,10 +198,16 @@ reset to ":raw" (the default unprocessed raw stream of bytes). =head2 NOT SCOPED The pragma is a per script, not a per block lexical. Only the last -C or C matters, and it affects B. -However, the pragma is supported and C can -appear as many times as you want in a given script. The multiple use -of this pragma is discouraged. +C or C matters, and it affects +B. However, the pragma is supported and +B can appear as many times as you want in a given script. +The multiple use of this pragma is discouraged. + +Because of this nature, the use of this pragma inside the module is +strongly discouraged (because the influence of this pragma lasts not +only for the module but the script that uses). But if you have to, +make sure you say C at the end of the module so you +contain the influence of the pragma within the module. =head2 DO NOT MIX MULTIPLE ENCODINGS