From: Tomas Doran Date: Fri, 21 Oct 2011 15:37:43 +0000 (-0600) Subject: And fix up the documentation some X-Git-Tag: 5.90005~4^2~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=c29dcdc3ea9c95069e3a4e451aa9803d9eee9a94 And fix up the documentation some --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index a52b53b..3e3587a 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1354,9 +1354,9 @@ sub uri_for { $res; } -=head2 $c->uri_for_action( $path, \@captures?, @args?, \%query_values? ) +=head2 $c->uri_for_action( $path, \@captures_and_args?, @args?, \%query_values? ) -=head2 $c->uri_for_action( $action, \@captures?, @args?, \%query_values? ) +=head2 $c->uri_for_action( $action, \@captures_and_args?, @args?, \%query_values? ) =over @@ -1385,6 +1385,30 @@ You can use: and it will create the URI /users/the-list. +=item \@captures_and_args? + +Optional array reference of Captures (i.e. C<req->captures>) +and arguments to the request. Usually used with L +to interpolate all the parameters in the URI. + +=item @args? + +Optional list of extra arguments - can be supplied in the C<< \@captures_and_args? >> +array ref, or here - whichever is easier for your code.. + +If your action may have a zero, a fixed or a variable number of args (e.g. C<< Args(1) >> +for a fixed number or C<< Args() >> for a variable number).. + +=item \%query_values? + +Optional array reference of query parameters to append. E.g. + + { foo => 'bar' } + +will generate + + /rest/of/your/uri?foo=bar + =back =cut