No OPf_SPECIAL on OP_ENTERSUB when readline() is overriden
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 21 Feb 2002 15:22:22 +0000 (16:22 +0100)
committerAbhijit Menon-Sen <ams@wiw.org>
Thu, 21 Feb 2002 14:02:12 +0000 (14:02 +0000)
   Message-Id: <20020221152222.A15095@rafael>

p4raw-id: //depot/perl@14811

op.h
toke.c

diff --git a/op.h b/op.h
index 1b5d828..604eaa3 100644 (file)
--- a/op.h
+++ b/op.h
@@ -104,6 +104,7 @@ Deprecated.  Use C<GIMME_V> instead.
                                /*  On OP_ENTERITER, loop var is per-thread */
                                /*  On pushre, re is /\s+/ imp. by split " " */
                                /*  On regcomp, "use re 'eval'" was in scope */
+                               /*  On OP_READLINE, was <$filehandle> */
 
 /* old names; don't use in new code, but don't break them, either */
 #define OPf_LIST       OPf_WANT_LIST
diff --git a/toke.c b/toke.c
index a9a2821..9440260 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -6744,7 +6744,8 @@ intro_sym:
                            newUNOP(OP_RV2SV, 0,
                                newGVOP(OP_GV, 0, gv)));
            }
-           PL_lex_op->op_flags |= OPf_SPECIAL;
+           if (!readline_overriden)
+               PL_lex_op->op_flags |= OPf_SPECIAL;
            /* we created the ops in PL_lex_op, so make yylval.ival a null op */
            yylval.ival = OP_NULL;
        }