Fixed test
André Walker [Sat, 23 Jul 2011 20:55:10 +0000 (17:55 -0300)]
t/lib/TestAppPathBug.pm
t/lib/TestAppPathBug/Controller/Root.pm [new file with mode: 0644]

index 74a2f27..7ae5f5b 100644 (file)
@@ -1,9 +1,6 @@
-use strict;
-use warnings;
-
 package TestAppPathBug;
-use strict;
-use warnings;
+use Moose;
+extends 'Catalyst';
 use Catalyst;
 
 our $VERSION = '0.01';
@@ -13,15 +10,9 @@ __PACKAGE__->config( name => 'TestAppPathBug', root => '/some/dir' );
 __PACKAGE__->log(TestAppPathBug::Log->new);
 __PACKAGE__->setup;
 
-sub foo : Path {
-    my ( $self, $c ) = @_;
-    $c->res->body( 'This is the foo method.' );
-}
-
 package TestAppPathBug::Log;
-use strict;
-use warnings;
-use base qw/Catalyst::Log/;
+use Moose;
+extends 'Catalyst::Log';
 
 sub warn {}
 
diff --git a/t/lib/TestAppPathBug/Controller/Root.pm b/t/lib/TestAppPathBug/Controller/Root.pm
new file mode 100644 (file)
index 0000000..b28d6b3
--- /dev/null
@@ -0,0 +1,14 @@
+package TestAppPathBug::Controller::Root;
+use Moose;
+use namespace::autoclean;
+
+BEGIN { extends 'Catalyst::Controller' };
+
+__PACKAGE__->config(namespace => '');
+
+sub foo : Path {
+    my ( $self, $c ) = @_;
+    $c->res->body( 'This is the foo method.' );
+}
+
+1;