Fix to allow uri_for and uri_with to stringify non-array references
[catagits/Catalyst-Runtime.git] / t / lib / TestApp / Controller / Engine / Request / URI.pm
index 97b2579..100557e 100644 (file)
@@ -41,6 +41,17 @@ sub uri_with : Local {
     $c->forward('TestApp::View::Dump::Request');\r
 }\r
 \r
+sub uri_with_object : Local {\r
+    my ( $self, $c ) = @_;\r
+\r
+    my $uri   = $c->req->uri_with( { a => $c->req->base } );\r
+    my %query = $uri->query_form;\r
+    \r
+    $c->res->header( 'X-Catalyst-Param-a' => $query{ a } );\r
+    \r
+    $c->forward('TestApp::View::Dump::Request');\r
+}\r
+\r
 sub uri_with_utf8 : Local {\r
     my ( $self, $c ) = @_;\r
 \r