Patch from the mailing list to clarify view warning
[catagits/Catalyst-Runtime.git] / t / lib / TestAppViewWarnings / Controller / Root.pm
diff --git a/t/lib/TestAppViewWarnings/Controller/Root.pm b/t/lib/TestAppViewWarnings/Controller/Root.pm
new file mode 100644 (file)
index 0000000..6d252f8
--- /dev/null
@@ -0,0 +1,17 @@
+package TestAppViewWarnings::Controller::Root;
+use strict;
+use warnings;
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+# Return log messages from previous request
+sub index :Path Args() {}
+
+sub end : Action {
+    my ($self, $c) = @_;
+    $c->view; # Cause view lookup and ergo warning we are testing.
+    $c->res->body('foo');
+}
+
+1;