From: Nicholas Clark Date: Mon, 21 Jan 2008 09:04:54 +0000 (+0000) Subject: Change the wantarray result from caller from IV to bool for the SCALAR/ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=98625aca47f1370710f55766e9a01234de61ed78;p=p5sagit%2Fp5-mst-13.2.git Change the wantarray result from caller from IV to bool for the SCALAR/ ARRAY case. This doesn't contradict the documentation, as there isn't any. Oops. p4raw-id: //depot/perl@33022 --- diff --git a/pp_ctl.c b/pp_ctl.c index 25cd02f..8bca225 100644 --- 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) {