From: M. J. T. Guy Date: Mon, 17 Jul 2000 20:04:56 +0000 (+0100) Subject: Bind op fix. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=de4bf5b3f25740f501dafc07bf0bdefe01434583;p=p5sagit%2Fp5-mst-13.2.git Bind op fix. Subject: Re: [PATCH] [ID 20000716.011] strangeness with split($_ =~ m/.../) Message-Id: p4raw-id: //depot/perl@6431 --- diff --git a/op.c b/op.c index ec43cce..14c5573 100644 --- a/op.c +++ b/op.c @@ -1983,9 +1983,10 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right) desc, sample, sample); } - if (right->op_type == OP_MATCH || + if (!(right->op_flags & OPf_STACKED) && + (right->op_type == OP_MATCH || right->op_type == OP_SUBST || - right->op_type == OP_TRANS) { + right->op_type == OP_TRANS)) { right->op_flags |= OPf_STACKED; if (right->op_type != OP_MATCH) left = mod(left, right->op_type); @@ -6199,7 +6200,7 @@ Perl_ck_split(pTHX_ OP *o) cLISTOPo->op_last = kid; /* There was only one element previously */ } - if (kid->op_type != OP_MATCH) { + if (kid->op_type != OP_MATCH || kid->op_flags & OPf_STACKED) { OP *sibl = kid->op_sibling; kid->op_sibling = 0; kid = pmruntime( newPMOP(OP_MATCH, OPf_SPECIAL), kid, Nullop);