Blitz CRLF line endings
[catagits/Catalyst-Plugin-Static-Simple.git] / t / lib / IncTestApp.pm
1 package IncTestApp;
2 # FIXME: I have to do this because TestApp runs setup at compile time
3 # Perhaps it would be better to let the tests run setup?
4
5 use strict;
6 use Catalyst;
7 use FindBin;
8 use TestLog;
9
10 our $VERSION = '0.01';
11
12 IncTestApp->config(
13     name => 'TestApp',
14     debug => 1,
15     static => {
16         include_path => [
17             IncTestApp->config->{root},
18         ]
19     },
20     'Plugin::Static::Simple' => {
21         include_path => [
22             IncTestApp->config->{root} . '/overlay',
23         ]
24     },
25 );
26
27 IncTestApp->log( TestLog->new );
28 my @plugins = qw/Static::Simple/;
29
30 # load the SubRequest plugin if available
31 eval { 
32     require Catalyst::Plugin::SubRequest; 
33     die unless Catalyst::Plugin::SubRequest->VERSION ge '0.08';
34 };
35 push @plugins, 'SubRequest' unless ($@);
36
37 IncTestApp->setup( @plugins );
38
39 sub incpath_generator {
40     my $c = shift;
41     
42     return [ $c->config->{root} . '/incpath' ];
43 }
44
45
46 1;