From 8efb3254a3038b56a803e45ffac89f07da99a3a7 Mon Sep 17 00:00:00 2001 From: Gurusamy Sarathy Date: Sun, 9 May 1999 20:23:07 +0000 Subject: [PATCH] allow readline($globref), <$globref> already works p4raw-id: //depot/perl@3349 --- pp_hot.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pp_hot.c b/pp_hot.c index f48e98f..3a46861 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -204,19 +204,15 @@ PP(pp_readline) { tryAMAGICunTARGET(iter, 0); PL_last_in_gv = (GV*)(*PL_stack_sp--); - if (PL_op->op_flags & OPf_SPECIAL) { /* Are called as <$var> */ - if (SvROK(PL_last_in_gv)) { - if (SvTYPE(SvRV(PL_last_in_gv)) != SVt_PVGV) - goto hard_way; + if (SvTYPE(PL_last_in_gv) != SVt_PVGV) { + if (SvROK(PL_last_in_gv) && SvTYPE(SvRV(PL_last_in_gv)) == SVt_PVGV) PL_last_in_gv = (GV*)SvRV(PL_last_in_gv); - } else if (SvTYPE(PL_last_in_gv) != SVt_PVGV) { - hard_way: { + else { dSP; XPUSHs((SV*)PL_last_in_gv); PUTBACK; pp_rv2gv(ARGS); PL_last_in_gv = (GV*)(*PL_stack_sp--); - } } } return do_readline(); -- 2.7.4