Skip to content
Browse files

Add root controller to TestApp

Remove warn in t/001_basic.t:
[warn] Action methods (test_one) found defined in your application
class, TestApp. This is deprecated, please move them into a Root
controller.
  • Loading branch information...
1 parent b0736dd commit b00831af31d5d930ea2f8998f15cfa4005617757 @rbo rbo committed with Stevan Little
Showing with 17 additions and 11 deletions.
  1. +0 −11 t/lib/TestApp.pm
  2. +17 −0 t/lib/TestApp/Controller/Root.pm
View
11 t/lib/TestApp.pm
@@ -24,17 +24,6 @@ __PACKAGE__->config({
__PACKAGE__->setup;
-sub test_one : Global {
- my ($self, $c) = @_;
-
- $c->stash->{template} = 'test_one.xml.tmpl';
-
- $c->stash->{message} = 'Hello (Excel) World';
-
- $c->forward('TestApp::View::Excel');
-}
-
-
1;
__END__
View
17 t/lib/TestApp/Controller/Root.pm
@@ -0,0 +1,17 @@
+package TestApp::Controller::Root;
+
+use strict;
+use warnings;
+use parent 'Catalyst::Controller';
+
+sub test_one : Global {
+ my ($self, $c) = @_;
+
+ $c->stash->{template} = 'test_one.xml.tmpl';
+
+ $c->stash->{message} = 'Hello (Excel) World';
+
+ $c->forward('TestApp::View::Excel');
+}
+
+1;

0 comments on commit b00831a

Please sign in to comment.
Something went wrong with that request. Please try again.