]> iEval git - plack-app-gruntmaster.git/blobdiff - app.psgi
Add a few tests
[plack-app-gruntmaster.git] / app.psgi
index 3d4fe5205325d9d5f984d3ca8237bbe8bd6dfeb2..058bfc171284f3ed3820e59aa2bc701afbb9c26b 100644 (file)
--- a/app.psgi
+++ b/app.psgi
@@ -15,7 +15,7 @@ use constant AUTH_TIMEOUT => 5 * 60;
 use constant ACCESSLOG_FORMAT => '%{X-Forwarded-For}i|%h %u "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
 use constant CONTENT_SECURITY_POLICY => q,default-src 'none'; script-src 'self' www.google-analytics.com; style-src 'self'; img-src 'self'; connect-src 'self'; frame-src free.timeanddate.com,;
 
-my $db = Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} //' dbi:Pg:');
+our $db //= Gruntmaster::Data->connect($ENV{GRUNTMASTER_DSN} //' dbi:Pg:');
 
 tie my %auth, 'Tie::Hash::Expire', {expire_seconds => AUTH_TIMEOUT};
 
@@ -40,7 +40,7 @@ sub add_headers {
        }
 }
 
-Log::Log4perl->init('log.conf');
+Log::Log4perl->init_once('log.conf');
 my $access_logger = Log::Log4perl->get_logger('access');
 $ENV{DBIC_NULLABLE_KEY_NOWARN} = 1;
 
This page took 0.022663 seconds and 4 git commands to generate.