]> ruin.nu Git - ndwebbie.git/blob - lib/NDWeb.pm
Converted alliance-resources
[ndwebbie.git] / lib / NDWeb.pm
1 package NDWeb;
2
3 use strict;
4 use warnings;
5
6 use Catalyst::Runtime '5.70';
7
8 #Need to preload, otherwise the first hit is slow
9 use CGI qw/:standard/;
10 escapeHTML('');
11
12 # Set flags and add plugins for the application
13 #
14 #         -Debug: activates the debug mode for very useful log messages
15 #   ConfigLoader: will load the configuration from a YAML file in the
16 #                 application's home directory
17 # Static::Simple: will serve static files from the application's root 
18 #                 directory
19
20 use parent qw/Catalyst/;
21
22 our $VERSION = '0.01';
23
24 # Configure the application. 
25 #
26 # Note that settings in ndweb.yml (or other external
27 # configuration file that you set up manually) take precedence
28 # over this when using ConfigLoader. Thus configuration
29 # details given here can function as a default configuration,
30 # with a external configuration file acting as an override for
31 # local deployment.
32
33 __PACKAGE__->config( name => 'NDWeb' );
34 __PACKAGE__->config->{'Plugin::Authentication'}{'use_session'} = 1;
35
36
37
38 # Start the application
39 __PACKAGE__->setup(qw/
40         -Debug
41         ConfigLoader
42         Static::Simple
43
44         Authentication
45         Authentication::Store::NDWeb
46         Authentication::Credential::Password
47
48         Authorization::Roles
49         Authorization::ACL
50         
51         Session
52         Session::Store::File
53         Session::State::Cookie
54         /);
55
56 __PACKAGE__->deny_access_unless('/users',[qw/admin_users/]);
57 __PACKAGE__->deny_access_unless('/alliances/resources',[qw/alliances_resources/]);
58
59 =head1 NAME
60
61 NDWeb - Catalyst based application
62
63 =head1 SYNOPSIS
64
65     script/ndweb_server.pl
66
67 =head1 DESCRIPTION
68
69 [enter your description here]
70
71 =head1 SEE ALSO
72
73 L<NDWeb::Controller::Root>, L<Catalyst>
74
75 =head1 AUTHOR
76
77 Catalyst developer
78
79 =head1 LICENSE
80
81 This library is free software, you can redistribute it and/or modify
82 it under the same terms as Perl itself.
83
84 =cut
85
86 1;