summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorMark-Jason Dominus <mjd@plover.com>2001-12-24 13:14:48 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-24 23:47:53 +0000
commitb6512f489e761186d508cf0b8b7705805cfefc52 (patch)
treeae8853499fff0ef5c11e82b7bf9dd55fc85955f5 /op.c
parentecf68df6e17568faac489c8f52d98e01e32472af (diff)
downloadperl-b6512f489e761186d508cf0b8b7705805cfefc52.tar.gz
PATCH: Restore "Can't declare scalar dereference in my" error
Message-ID: <20011224231448.25826.qmail@plover.com> p4raw-id: //depot/perl@13881
Diffstat (limited to 'op.c')
-rw-r--r--op.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.c b/op.c
index c7330521d7..efb99e0939 100644
--- a/op.c
+++ b/op.c
@@ -2043,6 +2043,9 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
} else if (type == OP_RV2SV || /* "our" declaration */
type == OP_RV2AV ||
type == OP_RV2HV) { /* XXX does this let anything illegal in? */
+ if (cUNOPo->op_first->op_type != OP_GV) { /* MJD 20011224 */
+ yyerror(form("Can't declare %s in my", OP_DESC(o)));
+ }
if (attrs) {
GV *gv = cGVOPx_gv(cUNOPo->op_first);
PL_in_my = FALSE;