Moved foo() from the app class to a root controller
Yousef H. Alhashemi [Sun, 16 Aug 2009 12:16:12 +0000 (12:16 +0000)]
t/lib/TestAppPathBug.pm
t/lib/TestAppPathBug/Controller/Root.pm [new file with mode: 0644]

index 3d3b11b..04582a7 100644 (file)
@@ -11,9 +11,4 @@ __PACKAGE__->config( name => 'TestAppPathBug', root => '/some/dir' );
 
 __PACKAGE__->setup;
 
-sub foo : Path {
-    my ( $self, $c ) = @_;
-    $c->res->body( 'This is the foo method.' );
-}
-
 1;
diff --git a/t/lib/TestAppPathBug/Controller/Root.pm b/t/lib/TestAppPathBug/Controller/Root.pm
new file mode 100644 (file)
index 0000000..6fda94e
--- /dev/null
@@ -0,0 +1,12 @@
+package TestAppPathBug::Controller::Root;
+
+use base 'Catalyst::Controller';
+
+__PACKAGE__->config->{namespace} = '';
+
+sub foo : Path {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'This is the foo method.' );
+}
+
+1;