X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FUtils.pm;h=ff4f53da0d3072617cd575567834a43fb2ca1e2b;hb=3dc04d0865aa8666c3b780dd89e288a74c7cc323;hp=3f594e6a42d456c6ec33cfed4228f5f36a7277cf;hpb=9c7b676881de2255b45fdab5bfb71f58a5e6d236;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Utils.pm b/lib/Catalyst/Utils.pm index 3f594e6..ff4f53d 100644 --- a/lib/Catalyst/Utils.pm +++ b/lib/Catalyst/Utils.pm @@ -530,7 +530,7 @@ sub env_at_path_prefix { =head2 env_at_action -Localize C<$env> under the current controller path prefix: +Localize C<$env> under the current action namespace. package MyApp::Controller::User; @@ -543,11 +543,16 @@ Localize C<$env> under the current controller path prefix: my $env = $c->Catalyst::Utils::env_at_action; } -Assuming you have a requst like GET /user/name: +Assuming you have a request like GET /user/name: In the example case C<$env> will have PATH_INFO of '/' instead of '/user/name' and SCRIPT_NAME will now be '/user/name'. +Alternatively, assuming you have a requst like GET /user/name/foo: + +In this example case C<$env> will have PATH_INFO of '/foo' instead of +'/user/name/foo' and SCRIPT_NAME will now be '/user/name'. + This is probably a common case where you want to mount a PSGI application under an action but let the Args fall through to the PSGI app. @@ -575,7 +580,7 @@ sub env_at_action { =head2 env_at_request_uri -Localize C<$env> under the current controller path prefix: +Localize C<$env> under the current request URI: package MyApp::Controller::User;