From: Gurusamy Sarathy Date: Fri, 12 Mar 1999 20:35:36 +0000 (+0000) Subject: change#3067 failed package.t due to needless creation of $a and $b; X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9ea6e965205e07bb7070635f11d3cc692765cd0c;p=p5sagit%2Fp5-mst-13.2.git change#3067 failed package.t due to needless creation of $a and $b; fixed to do that only for C, not C p4raw-link: @3067 on //depot/perl: 39ab52836386b91d2e2c323dd305cf42e6be3133 p4raw-id: //depot/perl@3106 --- diff --git a/op.c b/op.c index 220327d..08b27be 100644 --- a/op.c +++ b/op.c @@ -5114,12 +5114,7 @@ ck_sort(OP *o) o->op_private |= OPpLOCALE; #endif - if (o->op_type == OP_SORT) { - GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV)); - GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV)); - } - - if (o->op_flags & OPf_STACKED) + if (o->op_type == OP_SORT && o->op_flags & OPf_STACKED) simplify_sort(o); if (o->op_flags & OPf_STACKED) { /* may have been cleared */ OP *kid = cLISTOPo->op_first->op_sibling; /* get past pushmark */ @@ -5172,6 +5167,8 @@ simplify_sort(OP *o) int reversed; if (!(o->op_flags & OPf_STACKED)) return; + GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV)); + GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV)); kid = kUNOP->op_first; /* get past rv2gv */ if (kid->op_type != OP_SCOPE) return;