Mailing List Archive

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@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
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@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
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@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
Re: uri_for_action [ In reply to ]
* Hans Dieter Pearcey <hdp.perl.catalyst.dev@weftsoar.net> [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@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev
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@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst-dev