[Bast-commits] r4877 - Devel-Declare/1.000/trunk

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sat Oct 4 16:23:15 BST 2008


Author: rafl
Date: 2008-10-04 16:23:15 +0100 (Sat, 04 Oct 2008)
New Revision: 4877

Modified:
   Devel-Declare/1.000/trunk/stolen_chunk_of_toke.c
Log:
Remove support for long-deprecated -P for better portability.

Modified: Devel-Declare/1.000/trunk/stolen_chunk_of_toke.c
===================================================================
--- Devel-Declare/1.000/trunk/stolen_chunk_of_toke.c	2008-10-04 13:18:02 UTC (rev 4876)
+++ Devel-Declare/1.000/trunk/stolen_chunk_of_toke.c	2008-10-04 15:23:15 UTC (rev 4877)
@@ -306,16 +306,20 @@
 	    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
 	    PL_last_lop = PL_last_uni = Nullch;
 
-	    /* Close the filehandle.  Could be from -P preprocessor,
+	    /* In perl versions previous to p4-rawid: //depot/perl at 32954 -P
+	     * preprocessors were supported here. We don't support -P at all, even
+	     * on perls that support it, and use the following chunk from blead
+	     * perl. (rafl)
+	     */
+
+	    /* Close the filehandle.  Could be from
 	     * STDIN, or a regular file.  If we were reading code from
 	     * STDIN (because the commandline held no -e or filename)
 	     * then we don't close it, we reset it so the code can
 	     * read from STDIN too.
 	     */
 
-	    if (PL_preprocess && !PL_in_eval)
-		(void)PerlProc_pclose(PL_rsfp);
-	    else if ((PerlIO*)PL_rsfp == PerlIO_stdin())
+	    if ((PerlIO*)PL_rsfp == PerlIO_stdin())
 		PerlIO_clearerr(PL_rsfp);
 	    else
 		(void)PerlIO_close(PL_rsfp);




More information about the Bast-commits mailing list