catch a neophyte trap: open(<FH>), close(<FH>) etc.
Gurusamy Sarathy [Sat, 14 Nov 1998 00:17:05 +0000 (00:17 +0000)]
p4raw-id: //depot/perl@2235

op.c

diff --git a/op.c b/op.c
index 75c7d9f..e52aa4f 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4680,6 +4680,10 @@ ck_fun(OP *o)
                        op_free(kid);
                        kid = newop;
                    }
+                   else if (kid->op_type == OP_READLINE) {
+                       /* neophyte patrol: open(<FH>), close(<FH>) etc. */
+                       bad_type(numargs, "HANDLE", PL_op_desc[o->op_type], kid);
+                   }
                    else {
                        kid->op_sibling = 0;
                        kid = newUNOP(OP_RV2GV, 0, scalar(kid));