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