[Catalyst-dev] Developing action_uri() for Catalyst 5.80

J. Shirley jshirley at gmail.com
Fri Jun 6 21:56:49 BST 2008


On Fri, Jun 6, 2008 at 1:21 PM, Jason Gottshall <jgottshall at capwiz.com> wrote:
> I'd like to establish consensus on the calling signature (and method
> name) for action_uri(). Based on the code I've seen from others (and my
> own bias), here's one option:
>
>  $c->action_uri('/private/path/to/action', \@captures_if_any,
> \%query_params);
>
> Thoughts?
>
> Jason
>

My only thought is to not use strings to denote action paths.
$c->controller('MyController')->action_for('action') has served me
better.

I may be in the minority on this, but I generally dislike using
stringified private paths.  It also seems if you pass in an $action
object, rather than a scalar string, it can help the dispatcher.



More information about the Catalyst-dev mailing list