Now the application reads the yaml file. The TEST_DB environmental variable should...
[breadcrumbs.git] / web-site / breadcrumbs / lib / breadcrumbs.pm
blob8f2695844d347681760a1b99e925a8e7a2c8a889
1 package breadcrumbs;
3 use strict;
4 use warnings;
6 use Catalyst::Runtime '5.70';
7 use YAML;
10 # Set flags and add plugins for the application
12 # -Debug: activates the debug mode for very useful log messages
13 # ConfigLoader: will load the configuration from a YAML file in the
14 # application's home directory
15 # Static::Simple: will serve static files from the application's root
16 # directory
18 #use Catalyst qw//;
19 #-Debug
20 use Catalyst qw/
22 ConfigLoader
23 Static::Simple
25 Session
27 Session::Store::FastMmap
29 Session::State::Cookie
31 Authentication
32 Authentication::Credential::Password
34 Authorization::Roles
35 HTML::Widget
38 our $VERSION = '0.01';
40 # Configure the application.
42 # Note that settings in breadcrumbs.yml (or other external
43 # configuration file that you set up manually) take precedence
44 # over this when using ConfigLoader. Thus configuration
45 # details given here can function as a default configuration,
46 # with a external configuration file acting as an override for
47 # local deployment.
49 #__PACKAGE__->config( name => 'breadcrumbs' );
50 __PACKAGE__->config(YAML::LoadFile(__PACKAGE__->config->{'home'} . '/breadcrumbs.yml'));
52 if (__PACKAGE__->config()->{debug_mode} eq "true"){
53 __PACKAGE__->setup( qw/-Debug/);
54 } else {
55 __PACKAGE__->setup();
59 =head1 NAME
61 breadcrumbs - Catalyst based application
63 =head1 SYNOPSIS
65 script/breadcrumbs_server.pl
67 =head1 DESCRIPTION
69 [enter your description here]
71 =head1 SEE ALSO
73 L<breadcrumbs::Controller::Root>, L<Catalyst>
75 =head1 AUTHOR
77 Pasqualino Ferrentino,,,
79 =head1 LICENSE
81 This library is free software, you can redistribute it and/or modify
82 it under the same terms as Perl itself.
84 =cut