summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-05-09 20:23:07 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-05-09 20:23:07 +0000
commit8efb3254a3038b56a803e45ffac89f07da99a3a7 (patch)
treeb17fcab85e46b26db6a01b7cc18ced7f54f47958 /pp_hot.c
parentfebd60db78d69754497d8360da8c221b5cd2747b (diff)
downloadperl-8efb3254a3038b56a803e45ffac89f07da99a3a7.tar.gz
allow readline($globref), <$globref> already works
p4raw-id: //depot/perl@3349
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/pp_hot.c b/pp_hot.c
index f48e98f8dc..3a46861453 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();