summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-11 13:55:07 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-01-11 13:55:07 +0000
commit4c84d7f2a03f1d29578b3894e1b6863673b307fb (patch)
tree701d29965be00b3f11d54bc7b6fed464bdd4a2d9 /toke.c
parent5ac1e9b286b068746476878a8a6206b06828a175 (diff)
downloadperl-4c84d7f2a03f1d29578b3894e1b6863673b307fb.tar.gz
Remove the -P switch
p4raw-id: //depot/perl@32954
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/toke.c b/toke.c
index c3a847598c..32ef3e5f5e 100644
--- a/toke.c
+++ b/toke.c
@@ -1109,16 +1109,14 @@ S_skipspace(pTHX_ register char *s)
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
PL_last_lop = PL_last_uni = NULL;
- /* Close the filehandle. Could be from -P preprocessor,
+ /* 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);
@@ -3668,9 +3666,7 @@ Perl_yylex(pTHX)
PL_realtokenstart = -1;
#endif
if (PL_rsfp) {
- 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);
@@ -3717,16 +3713,7 @@ Perl_yylex(pTHX)
# endif
# endif
#endif
-#ifdef FTELL_FOR_PIPE_IS_BROKEN
- /* This loses the possibility to detect the bof
- * situation on perl -P when the libc5 is being used.
- * Workaround? Maybe attach some extra state to PL_rsfp?
- */
- if (!PL_preprocess)
- bof = PerlIO_tell(PL_rsfp) == SvCUR(PL_linestr);
-#else
bof = PerlIO_tell(PL_rsfp) == (Off_t)SvCUR(PL_linestr);
-#endif
if (bof) {
PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);
s = swallow_bom((U8*)s);
@@ -5662,9 +5649,7 @@ Perl_yylex(pTHX)
#endif
/* Mark this internal pseudo-handle as clean */
IoFLAGS(GvIOp(gv)) |= IOf_UNTAINT;
- if (PL_preprocess)
- IoTYPE(GvIOp(gv)) = IoTYPE_PIPE;
- else if ((PerlIO*)PL_rsfp == PerlIO_stdin())
+ if ((PerlIO*)PL_rsfp == PerlIO_stdin())
IoTYPE(GvIOp(gv)) = IoTYPE_STD;
else
IoTYPE(GvIOp(gv)) = IoTYPE_RDONLY;