This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [ID 20020626.011] wantarray() causes clobbering of unrelated vars outside the sub
authorHugo van der Sanden <hv@crypt.org>
Thu, 27 Jun 2002 11:58:57 +0000 (12:58 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 27 Jun 2002 11:12:43 +0000 (11:12 +0000)
Message-ID: <200206271058.g5RAwvE29057@crypt.compulink.co.uk>

p4raw-id: //depot/perl@17369

op.c

diff --git a/op.c b/op.c
index 0038680..9a53f07 100644 (file)
--- a/op.c
+++ b/op.c
@@ -3900,6 +3900,8 @@ S_new_logop(pTHX_ I32 type, I32 flags, OP** firstp, OP** otherp)
        }
     }
     else if (first->op_type == OP_WANTARRAY) {
+       /* XXX true only if this result will be returned, else should
+          propagate outer context */
        if (type == OP_AND)
            list(other);
        else
@@ -3995,6 +3997,8 @@ Perl_newCONDOP(pTHX_ I32 flags, OP *first, OP *trueop, OP *falseop)
        }
     }
     else if (first->op_type == OP_WANTARRAY) {
+       /* XXX true only if this result will be returned, else should
+          propagate outer context */
        list(trueop);
        scalar(falseop);
     }