summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-09 12:41:40 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-09 12:41:40 +0000
commitf11453cb67be9d8a1114ce1f83b9621c7db2b995 (patch)
treef9c901b7302fe4f19256b368cd268fabd7b1576b /op.c
parentb123ab9da00617145bdd8b4b325a5f78afda05c1 (diff)
downloadperl-f11453cb67be9d8a1114ce1f83b9621c7db2b995.tar.gz
Tweaking the order of op creation/op free in Perl_ck_require to Larry's
order doesn't make tests pass :-(. Nor does it make them fail. p4raw-id: //depot/perl@27435
Diffstat (limited to 'op.c')
-rw-r--r--op.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/op.c b/op.c
index 92dc88a511..1471c2ff1d 100644
--- a/op.c
+++ b/op.c
@@ -6836,18 +6836,18 @@ Perl_ck_require(pTHX_ OP *o)
if (gv && GvCVu(gv) && GvIMPORTED_CV(gv)) {
OP * const kid = cUNOPo->op_first;
- OP * newop
- = ck_subr(newUNOP(OP_ENTERSUB, OPf_STACKED,
- append_elem(OP_LIST, kid,
- scalar(newUNOP(OP_RV2CV, 0,
- newGVOP(OP_GV, 0,
- gv))))));
+ OP * newop;
+
cUNOPo->op_first = 0;
-#ifdef PERL_MAD
- op_getmad(o,newop,'O');
-#else
+#ifndef PERL_MAD
op_free(o);
#endif
+ newop = ck_subr(newUNOP(OP_ENTERSUB, OPf_STACKED,
+ append_elem(OP_LIST, kid,
+ scalar(newUNOP(OP_RV2CV, 0,
+ newGVOP(OP_GV, 0,
+ gv))))));
+ op_getmad(o,newop,'O');
return newop;
}