Change the wantarray result from caller from IV to bool for the SCALAR/
Nicholas Clark [Mon, 21 Jan 2008 09:04:54 +0000 (09:04 +0000)]
ARRAY case. This doesn't contradict the documentation, as there isn't
any. Oops.

p4raw-id: //depot/perl@33022

pp_ctl.c

index 25cd02f..8bca225 100644 (file)
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1669,7 +1669,7 @@ PP(pp_caller)
     if (gimme == G_VOID)
        PUSHs(&PL_sv_undef);
     else
-       mPUSHi(gimme & G_ARRAY);
+       PUSHs(boolSV((gimme & G_WANT) == G_ARRAY));
     if (CxTYPE(cx) == CXt_EVAL) {
        /* eval STRING */
        if (cx->blk_eval.old_op_type == OP_ENTEREVAL) {