diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-09 11:08:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-09 11:08:51 +0000 |
commit | 016501c1bd27cb10e1edd3e59809e490357b700c (patch) | |
tree | aece2f7ac7a8a35ee7adcc5f329c5d75041993f9 | |
parent | 051f02e983053ff48094f7dc29c02d94b7f7d171 (diff) | |
parent | b7711e741569c03e279a3607f6b4e22eb5665f90 (diff) | |
download | perl-016501c1bd27cb10e1edd3e59809e490357b700c.tar.gz |
Integrate change #11519 from perlio:
Avoid testing for (non-)existance of "encoding(xxxx)"
layer is called "encoding" the (xxxx) is an argument.
p4raw-link: @11519 on //depot/perl: cb7ddd31f93d0675b449b95767297ddc411dbc09
p4raw-id: //depot/perl@11617
-rw-r--r-- | lib/open.pm | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/open.pm b/lib/open.pm index 1456666edd..3d7782fc8b 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -71,9 +71,10 @@ sub import { } else { $layer = "encoding($locale_encoding)"; } - } - unless(PerlIO::Layer::->find($layer)) { - carp("Unknown discipline layer '$layer'"); + } else { + unless(PerlIO::Layer::->find($layer)) { + carp("Unknown discipline layer '$layer'"); + } } push(@val,":$layer"); if ($layer =~ /^(crlf|raw)$/) { |