[Catalyst] RunAfterRequest/delayed Catalyst view

Matt S Trout mst at shadowcat.co.uk
Sun May 2 19:49:32 GMT 2010

On Fri, Apr 30, 2010 at 02:38:50PM -0700, Steve Kleiman wrote:
> Here goes...hopefully a simple test case for the RunAfterRequest oddness.

> The code below with the forward INSIDE 'run_after_request' subroutine throws the error:
> > [error] Caught exception in engine "Modification of non-creatable array value attempted, subscript -1 at /usr/local/lib/perl5/site_perl/5.10.1/Catalyst/Dispatcher.pm line 278."

I think that's probably $c->stack being empty because there's no request

I *think* that


would work, since that doesn't rely on the action call stack.

That error message is fucking awful though, and almost certainly my fault.

Proposal: first you try the ->process-by-hand approach to confirm that I'm
an idiot the way I think I am. Second we discuss how to either (a) fix this
or (b) make sure it produces a non-awful error.

(even if you've already rewritten the code it'd be much appreciated if you
could try this out and see if it does the right thing - also, you then get to
point and laugh at me with a bit of luck, which may or may not be an added
incentive ;)

Matt S Trout - Shadowcat Systems - Perl consulting with a commit bit and a clue

http://shadowcat.co.uk/blog/matt-s-trout/   http://twitter.com/shadowcat_mst/

Email me now on mst (at) shadowcat.co.uk and let's chat about how our Catalyst
commercial support, training and consultancy packages could help your team.

More information about the Catalyst mailing list