[Catalyst] Question about $c->forward()

Sebastian Riedel sri at oook.de
Sat Nov 12 03:43:24 CET 2005


Am 12.11.2005 um 03:00 schrieb Drew Taylor:

> On 11/10/05, Sebastian Riedel <sri at oook.de> wrote:
>
> Upgrade or change the line
>
>      $c->forward('My::C::Second', 'default');
> to
>      $c->forward('/second/default');
>
>
> So is there a "preferred" or "best practices" way to call forward 
> ()? I've always used a url-style parameter (sri's second example),  
> but don't mind switching if one is preferred over the other. I find  
> the second form easier to understand, but if I'm not using any  
> Regex actions so far (which might change my mind).

No there is no preferred one, but uri-style has the advantage that we  
don't need to create a temporary Catalyst::Action, because we already  
have it cached.

Another advantage may be relevant soon, when we (nothingmuch) release  
the ACL framework, which will operate on uris.

--
sebastian




More information about the Catalyst mailing list