[Catalyst-commits] r11776 - in Catalyst-Runtime/5.80/trunk: . lib
altreus at dev.catalyst.perl.org
altreus at dev.catalyst.perl.org
Fri Nov 6 17:09:51 GMT 2009
Author: altreus
Date: 2009-11-06 17:09:51 +0000 (Fri, 06 Nov 2009)
New Revision: 11776
Modified:
Catalyst-Runtime/5.80/trunk/Changes
Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
Log:
Add doc for no-args call to ->uri_for
Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes 2009-11-06 15:26:13 UTC (rev 11775)
+++ Catalyst-Runtime/5.80/trunk/Changes 2009-11-06 17:09:51 UTC (rev 11776)
@@ -12,6 +12,9 @@
- Require HTTP::Request 5.814 and HTTP::Response 5.813 from LWP 5.814
to avoid test fails.
+ Documentation:
+ - Document no-args call to $c->uri_for.
+
New features:
- Added disable_component_resolution_regex_fallback config option to
switch off (deprecated) regex fallback for component resolution.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-11-06 15:26:13 UTC (rev 11775)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm 2009-11-06 17:09:51 UTC (rev 11776)
@@ -1198,7 +1198,7 @@
$class->setup_finished(1);
}
-=head2 $c->uri_for( $path, @args?, \%query_values? )
+=head2 $c->uri_for( $path?, @args?, \%query_values? )
=head2 $c->uri_for( $action, \@captures?, @args?, \%query_values? )
@@ -1206,6 +1206,11 @@
provided path, and the additional arguments and query parameters provided.
When used as a string, provides a textual URI.
+If no arguments are provided, the URI for the current action is returned.
+To return the current action and also provide @args, use
+C<< $c->uri_for( $c->action, @args ) >>. Don't do
+C<< $c->uri_for( undef, @args ) >>.
+
If the first argument is a string, it is taken as a public URI path relative
to C<< $c->namespace >> (if it doesn't begin with a forward slash) or
relative to the application root (if it does). It is then merged with
More information about the Catalyst-commits
mailing list