Add test controller with its own meta method, still works
[catagits/Catalyst-Runtime.git] / t / lib / TestAppWithMeta / Controller / Root.pm
diff --git a/t/lib/TestAppWithMeta/Controller/Root.pm b/t/lib/TestAppWithMeta/Controller/Root.pm
new file mode 100644 (file)
index 0000000..abda837
--- /dev/null
@@ -0,0 +1,19 @@
+package TestAppWithMeta::Controller::Root;
+use Moose;
+use namespace::clean -except => 'meta';
+
+BEGIN { extends 'Catalyst::Controller' }
+
+__PACKAGE__->config( namespace => '' );
+
+no warnings 'redefine';
+sub meta { 'fnar' }
+use warnings 'redefine';
+
+sub default : Private {
+    my ($self, $c) = @_;
+    $c->res->body($self->meta);
+}
+
+1;
+