X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst.pm;h=a3d8f9e18e7ebf19351542768f01f389987d1183;hp=80b0288fa8e9dea0f85ac11e6e3a09eadeffb6a0;hb=942572d7cd0a89d54b12ddd89de16ddcd19ca077;hpb=1d85cbb36bf233f539a393b827ab66a31419994b diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 80b0288..a3d8f9e 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -84,7 +84,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90004'; +our $VERSION = '5.90005'; sub import { my ( $class, @arguments ) = @_; @@ -1028,6 +1028,9 @@ Catalyst> line. MyApp->setup; MyApp->setup( qw/-Debug/ ); +B You B wrap this method with method modifiers +or bad things will happen - wrap the C method instead. + =cut sub setup { @@ -1351,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 @@ -1382,6 +1385,31 @@ 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. + +Your action can have 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 @@ -3013,7 +3041,7 @@ to be shown in hit debug tables in the test server. =item * -C - Controlls if the C or C environment +C - Controls if the C or C environment variable should be used for determining the request path. Most web server environments pass the requested path to the application using environment variables, @@ -3028,7 +3056,7 @@ is determined by the C<< $c->config(use_request_uri_for_path) >> setting (which =item use_request_uri_for_path => 0 This is the default (and the) traditional method that Catalyst has used for determining the path information. -The path is synthesised from a combination of the C and C environment variables. +The path is generated from a combination of the C and C environment variables. The allows the application to behave correctly when C is being used to redirect requests into the application, as these variables are adjusted by mod_rewrite to take account for the redirect.