[Catalyst] does detach cancel forward
andrew at cleverdomain.org
Sat Nov 7 09:07:16 GMT 2009
On Wednesday 04 November 2009 04:19:42 pm Ovid wrote:
> Think of detach as "game over", if that helps (probably doesn't). From the
> docs, detach(....) is described as:
> The same as forward, but doesn't return to the previous action when
> processing is finished.
> I think that description might be a bit confusing for some, as your
> question suggests.
Yeah, there are at least two big shortcomings.
1. I think that we should stop trying to over-simplify things here, or at
least stop *only* providing a simplified version and tell the truth: detach
forwards, and then it throws an exception. That exception propagates up until
the whole stack of running actions is unwound, and then Catalyst catches it
and continues processing as usual, calling any 'end' action and then doing
2. There's a "Flow Control" section in Catalyst::Manual::Intro that paints a
better picture than perldoc Catalyst, but someone going directly to the docs
for forward, detach, etc. can easily miss the pointers to
Catalyst::Manual::Intro. The whole Manual::Intro business is a mess that
nobody wants to touch. I don't know what to do with it either. :)
More information about the Catalyst