Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package AVC;
- use Moose;
- use namespace::autoclean;
- use Catalyst::Runtime 5.80;
- # Set flags and add plugins for the application
- #
- # -Debug: activates the debug mode for very useful log messages
- # ConfigLoader: will load the configuration from a Config::General file in the
- # application's home directory
- # Static::Simple: will serve static files from the application's root
- # directory
- # Other Plugins:
- # Cache
- # Email
- use HTML::FormFu::Preload;
- use Catalyst
- qw/
- -Debug
- +CatalystX::Debug::RequestHeaders
- +CatalystX::Debug::ResponseHeaders
- StackTrace
- Static::Simple
- Authentication
- Authorization::Roles
- Session
- Session::Store::FastMmap
- Session::State::Cookie
- +AVC::CatalystPlugs
- /;
- extends 'Catalyst';
- our $VERSION = '0.01';
- $VERSION = eval $VERSION;
- # Configure the application.
- __PACKAGE__->config(
- name => 'AVC',
- # Disable deprecated behavior needed by old applications
- disable_component_resolution_regex_fallback => 1,
- session => { flash_to_stash => 1 },
- default_view => 'TT',
- default_model => 'DB',
- 'Controller::HTML::FormFu' => {
- constructor => { render_method => 'tt' },
- },
- 'Plugin::Authentication' => {
- default => {
- store => {
- class => 'DBIx::Class',
- role_relation => 'roles',
- role_field => 'role',
- use_userdata_from_session => '1',
- user_model => 'DB::User',
- },
- credential => {
- #class => 'YubiKey',
- #api_id => '****',
- #api_key => '*****',
- #id_for_store => 'ykid',
- class => 'Password',
- password_type => 'self_check',
- },
- },
- },
- 'Model::DB' => {
- connect_info => {
- #dsn => 'dbi:SQLite:dbname=test.db',
- dsn => 'dbi:Pg:host=*****;dbname=*****',
- user => '***',
- password => '***',
- AutoCommit => q{1},
- name_sep => q{.},
- quote_char => q{"},
- #on_connect_do => q{PRAGMA foreign_keys = ON},
- #on_connect_call => 'use_foreign_keys',
- }
- },
- "Plugin::StackTrace" => {
- enable => 1,
- reverse => 1,
- verbose => 2,
- },
- #"Plugin::Scheduler" => {
- # logging => 1,
- # time_zone => 'America/Chicago',
- #},
- );
- # Start the application
- __PACKAGE__->setup();
- =head1 NAME
- AVC - A Catalyst based AV equipment rental system.
- =head1 SYNOPSIS
- To start the development/testing server, run:
- perl script/avc_server.pl
- =head1 DESCRIPTION
- [enter your description here]
- =head1 SEE ALSO
- L<AVC::Controller::Root>, L<Catalyst>
- =head1 AUTHOR
- Matt Sickler
- =head1 LICENSE
- This library is free software. You can redistribute it and/or modify
- it under the same terms as Perl itself.
- =cut
- 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement