[Catalyst] does detach cancel forward
davewood at gmx.at
Sat Nov 7 08:52:02 GMT 2009
>From the new Catalyst Book:
"$c->forward returns to the calling action and ompletes the request,
while $c->detach proceeds to the end action after the called actions
On Wed, Nov 4, 2009 at 11:19 PM, Ovid <publiustemp-catalyst at yahoo.com> wrote:
> ----- Original Message ----
>> From: Steve Rippl <rippls at woodlandschools.org>
>> I'm building "chains" of methods using forward and detach mostly, I
>> quote the chains because I know it's not the regular chained methods but
>> my "chains" vary according to where you are etc. Anyway, the question I
>> have is whether forward is still valid after a detach... let me
>> If A forwards to B, once B is done it comes back to A, that I use and it
>> works. If C detaches to D to doesn't come back after D, again I use
>> Now, If from A I forward to B, then B detaches to C which detaches to D,
>> it doesn't seem to come back to A after D. Is this my mistake
>> somewhere, is it by design? Does the detach after a forward "cancel"
>> the forward?
> 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.
> Buy the book - http://www.oreilly.com/catalog/perlhks/
> Tech blog - http://use.perl.org/~Ovid/journal/
> Twitter - http://twitter.com/OvidPerl
> Official Perl 6 Wiki - http://www.perlfoundation.org/perl6
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://email@example.com/
> Dev site: http://dev.catalyst.perl.org/
David Schmidt | http://www.fm5.at
More information about the Catalyst