File: IncTestApp.pm

package info (click to toggle)
libcatalyst-plugin-static-simple-perl 0.36-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 384 kB
  • sloc: perl: 2,629; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 922 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package IncTestApp;
# FIXME: I have to do this because TestApp runs setup at compile time
# Perhaps it would be better to let the tests run setup?

use strict;
use Catalyst;
use FindBin;
use TestLog;

our $VERSION = '0.01';

IncTestApp->config(
    name => 'TestApp',
    debug => 1,
    static => {
        include_path => [
            IncTestApp->config->{root},
        ]
    },
    'Plugin::Static::Simple' => {
        include_path => [
            IncTestApp->config->{root} . '/overlay',
        ]
    },
);

IncTestApp->log( TestLog->new );
my @plugins = qw/Static::Simple/;

# load the SubRequest plugin if available
eval { 
    require Catalyst::Plugin::SubRequest; 
    die unless Catalyst::Plugin::SubRequest->VERSION ge '0.08';
};
push @plugins, 'SubRequest' unless ($@);

IncTestApp->setup( @plugins );

sub incpath_generator {
    my $c = shift;
    
    return [ $c->config->{root} . '/incpath' ];
}


1;