source: trunk/lib/Vote.pm @ 86

Last change on this file since 86 was 70, checked in by nanardon, 15 years ago
  • show original value/mapped value
File size: 1.6 KB
Line 
1package Vote;
2
3use strict;
4use warnings;
5use Config::YAML;
6
7use Catalyst::Runtime '5.70';
8
9# Set flags and add plugins for the application
10#
11#         -Debug: activates the debug mode for very useful log messages
12#   ConfigLoader: will load the configuration from a YAML file in the
13#                 application's home directory
14# Static::Simple: will serve static files from the application's root
15#                 directory
16
17use Catalyst qw/
18    ConfigLoader
19    Static::Simple
20    Session
21    Session::Store::DBI
22    Session::State::Cookie
23    /;
24
25our $VERSION = '0.01';
26
27# Configure the application.
28#
29# Note that settings in Vote.yml (or other external
30# configuration file that you set up manually) take precedence
31# over this when using ConfigLoader. Thus configuration
32# details given here can function as a default configuration,
33# with a external configuration file acting as an override for
34# local deployment.
35
36__PACKAGE__->config( name => 'Vote' );
37
38__PACKAGE__->config->{session} = {
39    expires   => 1800,
40    dbi_table => 'sessions',
41    dbi_dsn => 'noo',
42};
43
44
45# Start the application
46__PACKAGE__->setup;
47
48# This is after because db config is in config file
49__PACKAGE__->config->{session}{dbi_dsn} = 'dbi:Pg:' . __PACKAGE__->config->{db};
50
51
52=head1 NAME
53
54Vote - Catalyst based application
55
56=head1 SYNOPSIS
57
58    script/vote_server.pl
59
60=head1 DESCRIPTION
61
62[enter your description here]
63
64=head1 SEE ALSO
65
66L<Vote::Controller::Root>, L<Catalyst>
67
68=head1 AUTHOR
69
70Thauvin Olivier
71
72=head1 LICENSE
73
74This library is free software, you can redistribute it and/or modify
75it under the same terms as Perl itself.
76
77=cut
78
791;
Note: See TracBrowser for help on using the repository browser.