Apply patch to clarify uri_for action from Octavian Rasnita on list
Tomas Doran [Sun, 10 Jan 2010 14:22:15 +0000 (14:22 +0000)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 31aea74..1be1533 100644 (file)
--- a/Changes
+++ b/Changes
@@ -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:
index 7cc6ad2..98864ee 100644 (file)
@@ -1329,6 +1329,20 @@ $c->uri_for >>.
 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 @@ numa: Dan Sully <daniel@cpan.org>
 
 obra: Jesse Vincent
 
+Octavian Rasnita
+
 omega: Andreas Marienborg
 
 Oleg Kostyuk <cub.uanic@gmail.com>