Unicode plugin - rework exception handler
[catagits/Catalyst-Runtime.git] / t / lib / TestAppWithoutUnicode / Controller / Root.pm
diff --git a/t/lib/TestAppWithoutUnicode/Controller/Root.pm b/t/lib/TestAppWithoutUnicode/Controller/Root.pm
new file mode 100644 (file)
index 0000000..4328fb9
--- /dev/null
@@ -0,0 +1,17 @@
+package TestAppWithoutUnicode::Controller::Root;
+
+use Moose;
+BEGIN { extends 'Catalyst::Controller' }
+use Encode qw(encode_utf8 decode_utf8);
+
+__PACKAGE__->config( namespace => q{} );
+
+sub default : Private {
+    my ( $self, $c ) = @_;
+    my $param = decode_utf8($c->request->parameters->{'myparam'});
+    $c->response->body( encode_utf8($param) );
+}
+
+__PACKAGE__->meta->make_immutable;
+
+1;