Merged 5.49_01 (r1339) from refactored branch to trunk
[catagits/Catalyst-Runtime.git] / t / live / lib / TestApp / Controller / Engine / Request / URI.pm
diff --git a/t/live/lib/TestApp/Controller/Engine/Request/URI.pm b/t/live/lib/TestApp/Controller/Engine/Request/URI.pm
new file mode 100644 (file)
index 0000000..cb86f30
--- /dev/null
@@ -0,0 +1,31 @@
+package TestApp::Controller::Engine::Request::URI;\r
+\r
+use strict;\r
+use base 'Catalyst::Base';\r
+\r
+sub default : Private {\r
+    my ( $self, $c ) = @_;\r
+    \r
+    $c->forward('TestApp::View::Dump::Request');\r
+}\r
+\r
+sub change_path : Local {\r
+    my ( $self, $c ) = @_;\r
+    \r
+    # change the path\r
+    $c->req->path( '/my/app/lives/here' );\r
+    \r
+    $c->forward('TestApp::View::Dump::Request');\r
+}\r
+\r
+sub change_base : Local {\r
+    my ( $self, $c ) = @_;\r
+    \r
+    # change the base and uri paths\r
+    $c->req->base->path( '/new/location' );\r
+    $c->req->uri->path( '/new/location/engine/request/uri/change_base' );\r
+    \r
+    $c->forward('TestApp::View::Dump::Request');\r
+}\r
+\r
+1;\r