Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Dev

uri_for_action

 

 

Catalyst dev RSS feed   Index | Next | Previous | View Threaded


hdp.perl.catalyst.dev at weftsoar

Mar 27, 2009, 9:51 PM

Post #1 of 5 (2646 views)
Permalink
uri_for_action

<@confound> I really want $c->uri_for_action('/private/path', @other_stuff)
<@confound> that is EXACTLY LIKE uri_for except it runs $c->dispatcher->get_action_by_whatever on the first argument
<@confound> I find myself writing that over and over.
<@confound> Also I want captures and args to be a single argument
<@confound> AND A PONY
<@mst> confound: I want that too
<@mst> nobody seems to care enough to write it

I've created the 'uri_for_action' branch off 5.80 that implements the first two
lines of this quote. 'captures and args together' and 'A PONY' will have to
wait until later.

opinions? (in particular, mst, let me know if this isn't actually what you
were talking about wanting.)

hdp.

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


ash_cpan at firemirror

Mar 30, 2009, 12:26 PM

Post #2 of 5 (2515 views)
Permalink
Re: uri_for_action [In reply to]

On 28 Mar 2009, at 04:51, Hans Dieter Pearcey wrote:

> <@confound> I really want $c->uri_for_action('/private/path',
> @other_stuff)
> <@confound> that is EXACTLY LIKE uri_for except it runs $c-
> >dispatcher->get_action_by_whatever on the first argument
> <@confound> I find myself writing that over and over.
> <@confound> Also I want captures and args to be a single argument
> <@confound> AND A PONY
> <@mst> confound: I want that too
> <@mst> nobody seems to care enough to write it
>
> I've created the 'uri_for_action' branch off 5.80 that implements
> the first two
> lines of this quote. 'captures and args together' and 'A PONY' will
> have to
> wait until later.
>
> opinions? (in particular, mst, let me know if this isn't actually
> what you
> were talking about wanting.)
>
> hdp.

What's the behaviour when you dont provide enough @other_stuff, or if
you provide too much @other_stuff for the combined CaptureArgs+Args?

It should be die rather than return undef/invalid url.

-ash

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


hdp.perl.catalyst.dev at weftsoar

Mar 30, 2009, 1:35 PM

Post #3 of 5 (2517 views)
Permalink
Re: uri_for_action [In reply to]

On Mon, Mar 30, 2009 at 08:26:07PM +0100, Ash Berlin wrote:
> What's the behaviour when you dont provide enough @other_stuff, or if
> you provide too much @other_stuff for the combined CaptureArgs+Args?

It doesn't combine CaptureArgs + Args, and it hands off to uri_for, so the
behavior is the same as that.

It is exactly the same as

$c->uri_for(
$c->dispatcher->get_action_by_path($path),
@rest
);

> It should be die rather than return undef/invalid url.

It does whatever uri_for does.

hdp.

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


pagaltzis at gmx

Apr 1, 2009, 11:04 PM

Post #4 of 5 (2511 views)
Permalink
Re: uri_for_action [In reply to]

* Hans Dieter Pearcey <hdp.perl.catalyst.dev [at] weftsoar> [2009-03-28 05:55]:
> opinions?

Yes yes yes yes yes yes yes.

Carry on,
--
Aristotle Pagaltzis // <http://plasmasturm.org/>

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev


hdp.perl.catalyst.dev at weftsoar

Apr 2, 2009, 7:57 PM

Post #5 of 5 (2489 views)
Permalink
Re: uri_for_action [In reply to]

On Sat, Mar 28, 2009 at 12:51:59AM -0400, Hans Dieter Pearcey wrote:
> I've created the 'uri_for_action' branch off 5.80 that implements the first two
> lines of this quote. 'captures and args together' and 'A PONY' will have to
> wait until later.

I've merged this into trunk.

hdp.

_______________________________________________
Catalyst-dev mailing list
Catalyst-dev [at] lists
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev

Catalyst dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.