summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@covalent.net>2001-02-10 06:04:40 -0800
committerJarkko Hietaniemi <jhi@iki.fi>2001-02-11 06:30:23 +0000
commit0256094b4c2296e320dfc83acdb944c28ae745d0 (patch)
tree69af157ea0bbb4169614851b9171468e5fdced43 /op.c
parentbe24517c7d6dbd51b4477cded03d9c0853e614ee (diff)
downloadperl-0256094b4c2296e320dfc83acdb944c28ae745d0.tar.gz
Re: [patch] GvSHARED
Date: Sat, 10 Feb 2001 14:04:40 -0800 (PST) Message-ID: <Pine.LNX.4.21.0102101356000.15298-100000@mako.covalent.net> Subject: Re: [patch] GvSHARED From: Doug MacEachern <dougm@covalent.net> Date: Sat, 10 Feb 2001 15:00:54 -0800 (PST) Message-ID: <Pine.LNX.4.21.0102101453220.15298-100000@mako.covalent.net> Subject: [patch] attributes.pm support for `shared' From: Doug MacEachern <dougm@covalent.net> Date: Sat, 10 Feb 2001 20:08:48 -0800 (PST) Message-ID: <Pine.LNX.4.21.0102102004190.15298-100000@mako.covalent.net> our() attributes were ignored, our :shared pieces missing, allow attributes.pm to turn on shared. p4raw-id: //depot/perl@8766
Diffstat (limited to 'op.c')
-rw-r--r--op.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/op.c b/op.c
index 224cd61e33..366b183cc3 100644
--- a/op.c
+++ b/op.c
@@ -1956,6 +1956,16 @@ S_my_kid(pTHX_ OP *o, OP *attrs)
} else if (type == OP_RV2SV || /* "our" declaration */
type == OP_RV2AV ||
type == OP_RV2HV) { /* XXX does this let anything illegal in? */
+ if (attrs) {
+ GV *gv = cGVOPx_gv(cUNOPo->op_first);
+ PL_in_my = FALSE;
+ PL_in_my_stash = Nullhv;
+ apply_attrs(GvSTASH(gv),
+ (type == OP_RV2SV ? GvSV(gv) :
+ type == OP_RV2AV ? (SV*)GvAV(gv) :
+ type == OP_RV2HV ? (SV*)GvHV(gv) : (SV*)gv),
+ attrs);
+ }
o->op_private |= OPpOUR_INTRO;
return o;
} else if (type != OP_PADSV &&