Marcello Romani wrote:
> Matt S Trout ha scritto:
>> Marcello Romani wrote:
>>> Matt S Trout ha scritto:
>>>> I like checking ($c->action->reverse eq 'users/login') myself.
>>> Matt, what do you think of ($c->req->path eq 'auth/login') ?
>> Fine until the marketing department decides that actually, the URL should be
>> "authen/login". If you always use the private action names to do the work
>> that's easy to do. If you rely on public URIs in your code, not so easy ...
>>
>
> Thanks.
>
> Therefore the 'reverse' method gives the private "path" of the action ?
Yep. You could also match $c->action->class and ->name if you so desired.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/