This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More places that could be using G_WANT, not picked up by change 33021.
[perl5.git] / pp_ctl.c
index 8bca225..975d67e 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -2999,9 +2999,9 @@ S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq)
            && cLISTOPx(cUNOPx(PL_eval_root)->op_first)->op_last->op_type
            == OP_REQUIRE)
        scalar(PL_eval_root);
-    else if (gimme & G_VOID)
+    else if ((gimme & G_WANT) == G_VOID)
        scalarvoid(PL_eval_root);
-    else if (gimme & G_ARRAY)
+    else if ((gimme & G_WANT) == G_ARRAY)
        list(PL_eval_root);
     else
        scalar(PL_eval_root);