]> Dogcows Code - chaz/chatty/blob - lib/Chatty.pm
use a json view instead of writing json directly
[chaz/chatty] / lib / Chatty.pm
1 package Chatty;
2 use Moose;
3 use namespace::autoclean;
4
5 use Catalyst::Runtime 5.80;
6
7 # Set flags and add plugins for the application.
8 #
9 # Note that ORDERING IS IMPORTANT here as plugins are initialized in order,
10 # therefore you almost certainly want to keep ConfigLoader at the head of the
11 # list if you're using it.
12 #
13 # -Debug: activates the debug mode for very useful log messages
14 # ConfigLoader: will load the configuration from a Config::General file in the
15 # application's home directory
16 # Static::Simple: will serve static files from the application's root
17 # directory
18
19 use Catalyst qw/
20 ConfigLoader
21 StackTrace
22 Static::Simple
23 Authentication
24 Session
25 Session::Store::FastMmap
26 Session::State::Cookie
27 Unicode::Encoding
28 /;
29
30 extends 'Catalyst';
31
32 our $VERSION = '0.01';
33
34 # Configure the application.
35 #
36 # Note that settings in chatty.conf (or other external
37 # configuration file that you set up manually) take precedence
38 # over this when using ConfigLoader. Thus configuration
39 # details given here can function as a default configuration,
40 # with an external configuration file acting as an override for
41 # local deployment.
42
43 __PACKAGE__->config(
44 name => 'Chatty',
45 # Disable deprecated behavior needed by old applications
46 disable_component_resolution_regex_fallback => 1,
47 'Plugin::Authentication' => {
48 default => {
49 class => 'SimpleDB',
50 user_model => 'DB::Account',
51 password_type => 'clear',
52 },
53 },
54 'Plugin::Session' => {
55 flash_to_stash => 1,
56 },
57 default_view => 'HTML',
58 'View::JSON' => {
59 expose_stash => 'json',
60 },
61 );
62
63 # Start the application
64 __PACKAGE__->setup();
65
66
67 =head1 NAME
68
69 Chatty - Catalyst based application
70
71 =head1 SYNOPSIS
72
73 script/chatty_server.pl
74
75 =head1 DESCRIPTION
76
77 [enter your description here]
78
79 =head1 SEE ALSO
80
81 L<Chatty::Controller::Root>, L<Catalyst>
82
83 =head1 AUTHOR
84
85 Charles McGarvey
86
87 =head1 LICENSE
88
89 This library is free software. You can redistribute it and/or modify
90 it under the same terms as Perl itself.
91
92 =cut
93
94 1;
This page took 0.036851 seconds and 4 git commands to generate.