Commit | Line | Data |
d2739840 |
1 | package RestTest; |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Catalyst::Runtime '5.70'; |
7 | |
8 | # Set flags and add plugins for the application |
9 | # |
10 | # -Debug: activates the debug mode for very useful log messages |
11 | # ConfigLoader: will load the configuration from a YAML file in the |
12 | # application's home directory |
406086f3 |
13 | # Static::Simple: will serve static files from the application's root |
d2739840 |
14 | # directory |
15 | |
16 | use Catalyst; |
17 | |
18 | our $VERSION = '0.01'; |
19 | |
406086f3 |
20 | # Configure the application. |
d2739840 |
21 | # |
22 | # Note that settings in RestTest.yml (or other external |
23 | # configuration file that you set up manually) take precedence |
24 | # over this when using ConfigLoader. Thus configuration |
25 | # details given here can function as a default configuration, |
26 | # with a external configuration file acting as an override for |
27 | # local deployment. |
28 | |
29 | __PACKAGE__->config( name => 'RestTest' ); |
30 | |
31 | # Start the application |
32 | __PACKAGE__->setup; |
33 | |
424de19e |
34 | my $logger = Class::MOP::Class->create( |
35 | 'MyLog', |
36 | methods => { |
37 | (map { ($_ => sub { () }), ("is_${_}" => sub { () }) } qw(debug info warn error fatal)), |
38 | (map { ($_ => sub { () }) } qw(level levels enable disable abort)), |
39 | }, |
40 | ); |
41 | |
42 | __PACKAGE__->log($logger->new_object); |
d2739840 |
43 | |
44 | =head1 NAME |
45 | |
46 | RestTest - Catalyst based application |
47 | |
48 | =head1 SYNOPSIS |
49 | |
50 | script/resttest_server.pl |
51 | |
52 | =head1 DESCRIPTION |
53 | |
54 | [enter your description here] |
55 | |
56 | =head1 SEE ALSO |
57 | |
58 | L<RestTest::Controller::Root>, L<Catalyst> |
59 | |
60 | =head1 AUTHOR |
61 | |
62 | luke saunders |
63 | |
64 | =head1 LICENSE |
65 | |
66 | This library is free software, you can redistribute it and/or modify |
67 | it under the same terms as Perl itself. |
68 | |
69 | =cut |
70 | |
71 | 1; |