diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-08-09 06:23:44 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-08-09 06:23:44 +0000 |
commit | 97ed432b8a5d63d1b7bdda09343e34225e6da722 (patch) | |
tree | 5de6f202ad198641a04076d716c2d1acb5ff65db /lib/open.pm | |
parent | e5937be4fc68b98f3a19283789f243fd48c54ead (diff) | |
download | perl-97ed432b8a5d63d1b7bdda09343e34225e6da722.tar.gz |
Avoid testing for (non-)existance of "encoding(xxxx)"
layer is called "encoding" the (xxxx) is an argument.
p4raw-id: //depot/perlio@11615
Diffstat (limited to 'lib/open.pm')
-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)$/) { |