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

Ash Berlin ash_cpan at firemirror.com
Mon Jun 9 22:49:50 BST 2008


On 9 Jun 2008, at 20:06, Jason Gottshall wrote:

> On Friday, June 06, 2008 5:19 PM, Ash Berlin <ash_cpan at firemirror.com>
> wrote:
>
>> Oh and make sure that if you pass an invalid path, number
>> of captures or args that you die with an error rather than just
>> blowing up. Returning undef is more hassle than its worth IMO.
>
> You're referring to the fact that uri_for() returns undef in these
> situations? So action_uri() should include a re-implementation of the
> underlying logic of uri_for() rather than delegating to it. Am I
> interpreting that correctly?
>
> Jason

It would be different logic anyway. It can be done without duplicating  
code by checking the format/number of params before you hand off to  
the dispatcher (which is what generates urls for actions)

-ash



More information about the Catalyst-dev mailing list