Recent comments and posts model methods. Tags cloud. Post modtime fix.
[blog.pm.git] / lib / Blog.pm
blob56f587073948fca65e54dfe863fdb9933759761c
1 package Blog;
3 use strict;
5 use Catalyst::Runtime '5.70';
7 use Catalyst::Authentication::Store::Minimal;
9 use Blog::NewDB;
10 use Common::Unicode;
12 use Catalyst qw/
13 Unicode
15 ConfigLoader
17 Static::Simple
19 Session
20 Session::Store::FastMmap
21 Session::State::Cookie
23 Authentication
24 +Common::Plugin::Authorization::ACL::Paranoid
26 I18N
28 CustomErrorMessage
30 Singleton
31 Assets
33 +CatalystX::Plugin::I18N::URI
36 our $VERSION = '0.04';
38 __PACKAGE__->dispatcher_class( 'Common::Dispatcher::LangDetect' );
40 __PACKAGE__->config(
41 name => 'Blog',
42 style => 'default',
43 'Plugin::Assets' => {
44 path => '/static',
45 output_path => 'built/',
46 minify => 1
50 __PACKAGE__->setup;
52 __PACKAGE__->acl(
53 rules => {
54 '/index' => 1,
56 '/user/login' => sub { !shift->user_exists() },
57 '/user/login_openid' => sub { !shift->user_exists() },
58 '/user/logout' => sub { shift->user_exists() },
60 '/post/list' => 1,
61 '/post/view' => 1,
62 '/post/feed' => 1,
63 '/post/archive' => 1,
64 '/post/archive_list' => 1,
66 '/page/view' => 1,
68 '/tag/list' => 1,
69 '/tag/view' => 1,
71 '/comment/add' => 1,
72 '/comment/feed' => 1,
74 '*' => sub { shift->user_in_realm( 'admins' ) }
78 __PACKAGE__->log->disable( 'debug' ) if !__PACKAGE__->debug;
80 =head1 NAME
82 Blog - Catalyst based application
84 =head1 AUTHOR
86 vti
88 =head1 LICENSE
90 This library is free software, you can redistribute it and/or modify
91 it under the same terms as Perl itself.
93 =cut