in reply to Re^3: Best practices for warnings about wrong context
in thread Best practices for warnings about wrong context

In this example wantarray returns context in which the action called, not related to what body expects, so
$c->response->body(wantarray)
same as
my $x = wantarray; $c->response->body($x)

Replies are listed 'Best First'.
Re^5: Best practices for warnings about wrong context
by Your Mother (Archbishop) on Oct 05, 2015 at 17:23 UTC

    Sorry, you are quite right about that. I was talking crazy. It still does not print "1" though, as you're right, same wantarray context so nothing could be different, but returns false but defined.

      hm, in my case it prints "1", and wantarray+1 prints "2". strange. maybe different Catalyst version/plugins/setup. Anyway, defined but false, does not change whole topic idea.

        FWIW: 5.90042 for me right now.