Minor improvements

Updated TODO
Enabled preloading
Added defaultPSGI to WebGUI::Paths
Added example of testing site via Plack::Test
This commit is contained in:
Patrick Donelan 2010-04-18 14:51:24 -04:00
parent f99f672b06
commit 5c70ffb3e0
7 changed files with 30 additions and 19 deletions

View file

@ -1,16 +1,13 @@
use strict;
use Plack::Builder;
use WebGUI::Paths -inc;
use WebGUI::Paths -preload;
use WebGUI::Config;
use File::Spec;
my $standard_psgi = File::Spec->catfile(WebGUI::Paths->var, 'site.psgi');
builder {
my $first_app;
for my $config_file (WebGUI::Paths->siteConfigs) {
my $config = WebGUI::Config->new($config_file);
my $psgi = $config->get('psgiFile') || $standard_psgi;
my $psgi = $config->get('psgiFile') || WebGUI::Paths->defaultPsgi;
my $app = do {
$ENV{WEBGUI_CONFIG} = $config_file;
Plack::Util::load_psgi($psgi);