From: Nicholas Clark Date: Sat, 3 Feb 2001 23:53:16 +0000 (+0000) Subject: [ID 20010203.006] perlio.c is mis-reporting argument X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bccbfa77316f269e35ea29247d7506d2c3ba7e11;p=p5sagit%2Fp5-mst-13.2.git [ID 20010203.006] perlio.c is mis-reporting argument length byfailing to spot lack of closing ) Message-Id: p4raw-id: //depot/perl@8688 --- diff --git a/perlio.c b/perlio.c index 1c8f65d..1237497 100644 --- a/perlio.c +++ b/perlio.c @@ -651,6 +651,10 @@ PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names) PerlIO_funcs *tab = INT2PTR(PerlIO_funcs *, SvIV(SvRV(layer))); if (tab) { + if (as && (ae == Nullch)) { + ae = e; + Perl_warn(aTHX_ "perlio: argument list not closed for layer \"%.*s\"",(int)(e - s),s); + } len = (as) ? (ae-(as++)-1) : 0; if (!PerlIO_push(f,tab,mode,as,len)) return -1; diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 597473f..a62d8d1 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -2602,6 +2602,16 @@ the problem, however, you will get the same error message each time you run Perl. How to really fix the problem can be found in L section B. +=item perlio: argument list not closed for layer "%s" + +(S) When pusing a layer with arguments onto the Perl I/O system you forgot +the ) that closes the argument list. (Layers take care of transforming +data between external and internal representations.) Perl assumed that +the argument list finished at the next : or the end of the layer +specification. If your program didn't explicitly request the failing +operation, it may be the result of the value of the environment variable +PERLIO. + =item perlio: unknown layer "%s" (S) An attempt was made to push an unknown layer onto the Perl I/O