summaryrefslogtreecommitdiff
path: root/lib/open.pm
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-07-12 04:47:43 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-07-12 04:47:43 +0000
commitf38d7863e9c890f6e7b5e922b65b103f87ccdb42 (patch)
tree0e96be8b7aa2528ede7c1e7c1bd747d2be3c2dad /lib/open.pm
parent5a192dee57837ac67b6c6d2786ac0b8ef2199c3f (diff)
downloadperl-f38d7863e9c890f6e7b5e922b65b103f87ccdb42.tar.gz
Now the :locale pseudolayer *almost* works...
p4raw-id: //depot/perl@11292
Diffstat (limited to 'lib/open.pm')
-rw-r--r--lib/open.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/open.pm b/lib/open.pm
index c338abf7f3..a42f62353b 100644
--- a/lib/open.pm
+++ b/lib/open.pm
@@ -67,12 +67,15 @@ sub import {
if ($locale_encoding =~ /^utf-?8$/i) {
$layer = "utf8";
} else {
- $layer = "encoding($locale_encoding)";
+ $layer = "encoding";
}
}
unless(PerlIO::Layer::->find($layer)) {
carp("Unknown discipline layer '$layer'");
}
+ if (defined $locale_encoding) {
+ $layer = "$layer($locale_encoding)";
+ }
push(@val,":$layer");
if ($layer =~ /^(crlf|raw)$/) {
$^H{"open_$type"} = $layer;