This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change the wantarray result from caller from IV to bool for the SCALAR/
[perl5.git] / 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) {