From: Nick Ing-Simmons Date: Wed, 22 Jan 2003 09:06:23 +0000 (+0000) Subject: Report layer name (without arg) on fail, and attempt to X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c7732655732824f25d1659f5ebb5d4c3538d32e8;p=p5sagit%2Fp5-mst-13.2.git Report layer name (without arg) on fail, and attempt to autoload layer name. (Fix for [perl #20460]). p4raw-id: //depot/perlio@18549 --- diff --git a/lib/open.pm b/lib/open.pm index d771fcb..c294093 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -95,8 +95,8 @@ sub import { my $target = $layer; # the layer name itself $target =~ s/^(\w+)\(.+\)$/$1/; # strip parameters - unless(PerlIO::Layer::->find($target)) { - warnings::warnif("layer", "Unknown PerlIO layer '$layer'"); + unless(PerlIO::Layer::->find($target,1)) { + warnings::warnif("layer", "Unknown PerlIO layer '$target'"); } } push(@val,":$layer");