aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-02-22 15:26:35 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-02-22 15:26:35 +0000
commitc3bcd8b53758e09a3c003cc8afe13064edabd11e (patch)
tree993c2ba4fdf68b04d9f360d185c2d351817eedc1 /perllib/FixMyStreet/App.pm
parent8cd703dbab6847995ca2a0dc51ea7c0f9f486446 (diff)
load config from conf/general into FixMyStreet::App
Diffstat (limited to 'perllib/FixMyStreet/App.pm')
-rw-r--r--perllib/FixMyStreet/App.pm28
1 files changed, 11 insertions, 17 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 87c79c3cb..4ec941195 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -2,25 +2,17 @@ package FixMyStreet::App;
use Moose;
use namespace::autoclean;
-use Catalyst::Runtime 5.80;
+BEGIN {
+ use mySociety::Config;
+ mySociety::Config::set_file("conf/general");
+}
-# Set flags and add plugins for the application.
-#
-# Note that ORDERING IS IMPORTANT here as plugins are initialized in order,
-# therefore you almost certainly want to keep ConfigLoader at the head of the
-# list if you're using it.
-#
-# -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
+use Catalyst::Runtime 5.80;
use Catalyst qw/
- -Debug
- ConfigLoader
- Static::Simple
-/;
+ ConfigLoader
+ Static::Simple
+ /;
extends 'Catalyst';
@@ -36,7 +28,10 @@ our $VERSION = '0.01';
# local deployment.
__PACKAGE__->config(
+ %{ mySociety::Config::get_list() },
+
name => 'FixMyStreet::App',
+
# Disable deprecated behavior needed by old applications
disable_component_resolution_regex_fallback => 1,
);
@@ -44,7 +39,6 @@ __PACKAGE__->config(
# Start the application
__PACKAGE__->setup();
-
=head1 NAME
FixMyStreet::App - Catalyst based application