Fix warnings in new Catalyst
[catagits/Catalyst-Plugin-Static-Simple.git] / t / lib / TestApp.pm
index ff23ab8..cdd73f5 100644 (file)
@@ -2,14 +2,25 @@ package TestApp;
 \r
 use strict;\r
 use Catalyst;\r
+use FindBin;\r
 \r
 our $VERSION = '0.01';\r
 \r
 TestApp->config(\r
     name => 'TestApp',\r
+    debug => 1,\r
 );\r
 \r
-TestApp->setup( qw/Static::Simple/ );\r
+my @plugins = qw/Static::Simple/;\r
+\r
+# load the SubRequest plugin if available\r
+eval { \r
+    require Catalyst::Plugin::SubRequest; \r
+    die unless Catalyst::Plugin::SubRequest->VERSION ge '0.08';\r
+};\r
+push @plugins, 'SubRequest' unless ($@);\r
+\r
+TestApp->setup( @plugins );\r
 \r
 sub incpath_generator {\r
     my $c = shift;\r
@@ -17,10 +28,4 @@ sub incpath_generator {
     return [ $c->config->{root} . '/incpath' ];\r
 }\r
 \r
-sub default : Private {\r
-    my ( $self, $c ) = @_;\r
-    \r
-    $c->res->output( 'default' );\r
-}\r
-\r
 1;\r