Commit | Line | Data |
fbcc39ad |
1 | package TestApp::Controller::Engine::Request::URI;\r |
2 | \r |
3 | use strict;\r |
4 | use base 'Catalyst::Base';\r |
5 | \r |
6 | sub default : Private {\r |
7 | my ( $self, $c ) = @_;\r |
8 | \r |
9 | $c->forward('TestApp::View::Dump::Request');\r |
10 | }\r |
11 | \r |
12 | sub change_path : Local {\r |
13 | my ( $self, $c ) = @_;\r |
14 | \r |
15 | # change the path\r |
16 | $c->req->path( '/my/app/lives/here' );\r |
17 | \r |
18 | $c->forward('TestApp::View::Dump::Request');\r |
19 | }\r |
20 | \r |
21 | sub change_base : Local {\r |
22 | my ( $self, $c ) = @_;\r |
23 | \r |
24 | # change the base and uri paths\r |
25 | $c->req->base->path( '/new/location' );\r |
26 | $c->req->uri->path( '/new/location/engine/request/uri/change_base' );\r |
27 | \r |
28 | $c->forward('TestApp::View::Dump::Request');\r |
29 | }\r |
30 | \r |
31 | 1;\r |