[Catalyst] calling detach within begin

Jim Spath jspath at pangeamedia.com
Mon Jul 16 23:42:23 GMT 2007


Jim Spath wrote:
> I can't seem to get a detach call within my application's Root begin to 
> work.  While it does seem to stop processing with the begin method, 
> Catalyst continues processing whatever action was specified by the request.
> 
> I've looked through the docs and it seems like I might need to use auto()?
> 
> "The auto action is also distinguished by the fact that you can break 
> out of the processing chain by returning 0. If an auto action returns 0, 
> any remaining actions will be skipped, except for end."
> 
> Should I create an auto() action and forward to the action I was 
> previously detaching to, and return 0?

I've gone ahead and started returning auto and it appears to work.

It might be nice to make a note in the docs somewhere that calling 
detach in begin might not do what you expect and that returning 0 from 
auto is what you should be doing.

-- 
Jim Spath



More information about the Catalyst mailing list