[Catalyst-commits] r12596 - in Catalyst-Runtime/5.80/trunk: . lib
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Sun Jan 10 14:22:18 GMT 2010
Author: t0m
Date: 2010-01-10 14:22:15 +0000 (Sun, 10 Jan 2010)
New Revision: 12596
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Apply patch to clarify uri_for action from Octavian Rasnita on list
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2010-01-10 06:31:16 UTC (rev 12595)
+++ Catalyst-Runtime/5.80/trunk/Changes 2010-01-10 14:22:15 UTC (rev 12596)
@@ -1,5 +1,8 @@
# This file documents the revision history for Perl extension Catalyst.
+ Documentation:
+ - Clarify that uri_for_action works on private paths, with example.
+
5.80017 2010-01-10 02:27:29
Documentation:
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-01-10 06:31:16 UTC (rev 12595)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2010-01-10 14:22:15 UTC (rev 12596)
@@ -1329,6 +1329,20 @@
You can also pass in a Catalyst::Action object, in which case it is passed to
C<< $c->uri_for >>.
+Note that although the path looks like a URI that dispatches to the wanted action, it is not a URI, but an internal path to that action.
+
+For example, if the action looks like:
+
+ package MyApp::Controller::Users;
+
+ sub lst : Path('the-list') {}
+
+You can use:
+
+ $c->uri_for_action('/users/lst')
+
+and it will create the URI /users/the-list.
+
=back
=cut
@@ -2944,6 +2958,8 @@
obra: Jesse Vincent
+Octavian Rasnita
+
omega: Andreas Marienborg
Oleg Kostyuk <cub.uanic at gmail.com>
More information about the Catalyst-commits
mailing list