On Mon, Nov 15, 2010 at 9:26 AM, Bill Crawford
<billcrawford1...@gmail.com>wrote:

> > No, `forward` does not do a full redispatch. Most importantly,
> > if you’re using chains in your app, then `visit` will walk the
> > entire chain to the action you passed and call those actions
> > (as well as all the `begin` and `auto` actions along the way),
> > while `forward` will only call the action itself.
>
> Erm, he was asking for something that doesn't "do a full dispatch" ?
>

There's two difference with calling forward. $c->forward does not use
passed-in captures, and it doesn't run:

 $action = $c->dispatcher->expand_action($action);


which, IIRC, turns an action into a chain of actions.   I haven't looked at
in in quite some time so probably worth looking at the source.

So, $c->visit will run through the chain but also runs auto and end.
 $c->forward just executes the action w/o auto and end, but if the action is
part of a chain and expand_action has not been run then it won't run the
chain.  Seem right?


What's the reason that forward doesn't expand the chain and set the
captures?


-- 
Bill Moseley
mose...@hank.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to