Avoid testing for (non-)existance of "encoding(xxxx)"
Nick Ing-Simmons [Thu, 9 Aug 2001 06:23:44 +0000 (06:23 +0000)]
layer is called "encoding" the (xxxx) is an argument.

p4raw-id: //depot/perlio@11615

lib/open.pm

index 1456666..3d7782f 100644 (file)
@@ -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)$/) {