<br><br><div class="gmail_quote">On Mon, Nov 15, 2010 at 9:26 AM, Bill Crawford <span dir="ltr"><<a href="mailto:billcrawford1970@gmail.com">billcrawford1970@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> No, `forward` does not do a full redispatch. Most importantly,<br>
> if you’re using chains in your app, then `visit` will walk the<br>
> entire chain to the action you passed and call those actions<br>
> (as well as all the `begin` and `auto` actions along the way),<br>
> while `forward` will only call the action itself.<br>
<br>
</div>Erm, he was asking for something that doesn't "do a full dispatch" ?<br></blockquote><div><br></div><div>There's two difference with calling forward. $c->forward does not use passed-in captures, and it doesn't run:</div>
<div><br></div></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div class="gmail_quote"><div> <span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">$action = $c->dispatcher->expand_action($action);</span></div>
</div></blockquote><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div>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.</span></font><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">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?</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">What's the reason that forward doesn't expand the chain and set the captures?</span></font></div>
<div><div class="gmail_quote"><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div><br></div></div>-- <br>Bill Moseley<br><a href="mailto:moseley@hank.org">moseley@hank.org</a><br>
</div>