From: Gurusamy Sarathy Date: Sun, 9 May 1999 20:23:07 +0000 (+0000) Subject: allow readline($globref), <$globref> already works X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8efb3254a3038b56a803e45ffac89f07da99a3a7;p=p5sagit%2Fp5-mst-13.2.git allow readline($globref), <$globref> already works p4raw-id: //depot/perl@3349 --- 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();