From 742c9938af740b9ba758f4b03909f30106b285a5 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 2 Sep 2012 02:45:05 +0200 Subject: Use global configuration files. --- server.pl | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'server.pl') diff --git a/server.pl b/server.pl index 3a1ac83..dc65539 100755 --- a/server.pl +++ b/server.pl @@ -4,20 +4,25 @@ use strict; use warnings; use utf8; -use CGI::Application::Server; +use MyServer; use lib 'lib'; use FPanel::Interface; -#use MyCGI::App::Account::Dispatch; -my $server = CGI::Application::Server->new(); -#my $panel = FPanel::Interface->new( -# PARAMS => { cfg_file => ['config.yml'] -# , format => 'YAML' -# } -#); +my $server = MyServer->new(); $server->entry_points({ - '/cgi-bin' => #$panel - 'FPanel::Interface' + '/cgi-bin' => 'FPanel::Interface' }); + +my @config = 'default.in'; +push @config, 'config.in' if -f 'config.in'; + +# TODO: This is only for testing purposes. Using a blessed target above +# prevents me from logging in. +$server->options({ + '/cgi-bin' => { + PARAMS => { cfg_file => [ @config ], format => 'equal' } + } +}); + $server->run(); -- cgit v1.2.3