From: Adrian M. Enache Date: Sat, 21 Jun 2003 03:19:31 +0000 (+0300) Subject: Re: Is it a Bug? ($c .= "5") . "6" X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0165acc7988347eaec71b2c2d2a9764893f0c240;p=p5sagit%2Fp5-mst-13.2.git Re: Is it a Bug? ($c .= "5") . "6" Message-ID: <20030621001931.GB1255@ratsnest.hole> p4raw-id: //depot/perl@19841 --- diff --git a/op.c b/op.c index 2eadb10..947b5f3 100644 --- a/op.c +++ b/op.c @@ -4701,8 +4701,9 @@ Perl_ck_bitop(pTHX_ OP *o) OP * Perl_ck_concat(pTHX_ OP *o) { - if (cUNOPo->op_first->op_type == OP_CONCAT) - o->op_flags |= OPf_STACKED; + OP *kid = cUNOPo->op_first; + if (kid->op_type == OP_CONCAT && !(kUNOP->op_first->op_flags & OPf_MOD)) + o->op_flags |= OPf_STACKED; return o; } diff --git a/t/op/concat.t b/t/op/concat.t index c1a6e23..d515a59 100644 --- a/t/op/concat.t +++ b/t/op/concat.t @@ -18,7 +18,7 @@ sub ok { return $ok; } -print "1..18\n"; +print "1..19\n"; ($a, $b, $c) = qw(foo bar); @@ -104,3 +104,8 @@ sub beq { use bytes; $_[0] eq $_[1]; } ok(beq($l, "\x{fe}"), "right not changed after concat b+u"); ok(beq($r, "\x{101}"), "left not changed after concat b+u"); } + +{ + my $a; ($a .= 5) . 6; + ok($a == 5, "($a .= 5) . 6 - present since 5.000"); +}