package Foorum;
use strict;
use warnings;
use Catalyst qw/
ConfigLoader
Static::Simple
Authentication
Cache
Session::DynamicExpiry
Session
Session::Store::DBIC
Session::State::Cookie
I18N
FormValidator::Simple
Captcha
+Foorum::Plugin::FoorumUtils
/;
our $VERSION = '1.000005';
__PACKAGE__->config( { VERSION => $VERSION } );
__PACKAGE__->setup();
if ( __PACKAGE__->config->{function_on}->{page_cache} ) {
__PACKAGE__->setup_plugins( ['PageCache'] );
## set $c->language before create a key in PageCache
__PACKAGE__->config->{'Plugin::PageCache'}->{key_maker} = sub {
my $c = shift;
# something as the same as in Root.pm
# while it is called before we call sub auto in Root.pm
# and we may not call this if request doesn't call $c->cache_page
my $lang;
$lang = $c->req->cookie('lang')->value if ( $c->req->cookie('lang') );
$lang ||= $c->user->lang if ( $c->user_exists );
$lang ||= $c->config->{default_lang};
$lang = $c->req->param('lang') if ( $c->req->param('lang') );
$lang =~ s/\W+//isg;
$c->languages( [$lang] );
return '/' . $c->req->path;
};
} else {
{
no strict 'refs'; ## no critic (ProhibitNoStrict)
my $class = __PACKAGE__;
*{"$class\::cache_page"} = sub {1};
*{"$class\::clear_cached_page"} = sub {1};
}
}
1;
__END__
=head1 NAME
Foorum - forum system based on Catalyst
=head1 DESCRIPTION
nothing for now.
=head1 LIVE DEMO
L
=head1 FEATURES
=over 4
=item open source
u can FETCH all code from L any time any where.
=item Win32 compatibility
Linux/Unix/Win32 both OK.
=item templates
use L for UI.
=item built-in cache
use L or use L or others;
=item reliable job queue
use L
=item Multi Formatter
L, L, L, L
=item Captcha
To keep robot out.
=back
=head1 JOIN US
please send me an email to add u into the google.code Project members list.
=head1 TODO
L
=head1 SEE ALSO
L, L, L
=head1 AUTHOR
Fayland Lam, C<< >>
=head1 COPYRIGHT & LICENSE
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut