[Catalyst-commits] r8394 - in Catalyst-Runtime/5.80/trunk: . lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Wed Sep 10 16:15:29 BST 2008
Author: t0m
Date: 2008-09-10 16:15:29 +0100 (Wed, 10 Sep 2008)
New Revision: 8394
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Additional doc for uri_for to illustrate passing an action and captures (jhannah)
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2008-09-10 14:40:40 UTC (rev 8393)
+++ Catalyst-Runtime/5.80/trunk/Changes 2008-09-10 15:15:29 UTC (rev 8394)
@@ -6,6 +6,8 @@
- Added test for component instances getting $self->{value} from config.
- Add Catalyst::Response->print() method (ilmari)
- Optionally aggregate tests using Test::Aggregate (Florian Ragwitz).
+ - Additional docs for uri_for to mention how to use $c->action and
+ $c->req->captures (jhannah)
5.7XXXXXX XXXX
- Fix some Win32 test failures
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-09-10 14:40:40 UTC (rev 8393)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2008-09-10 15:15:29 UTC (rev 8394)
@@ -1011,6 +1011,15 @@
C<@args> is an arrayref it is treated as a list of captures to be passed
to C<uri_for_action>.
+You can maintain the arguments captured by an action (e.g.: Regex, Chained)
+using C<< $c->req->captures >>.
+
+ # For the current action
+ $c->uri_for($c->action, $c->req->captures);
+
+ # For the Foo action in the Bar controller
+ $c->uri_for($c->controller->('Bar')->action_for('Foo'), $c->req->captures);
+
=cut
sub uri_for {
More information about the Catalyst-commits
mailing list