More refactoring and documentation improvements

This commit is contained in:
Patrick Donelan 2010-04-09 01:12:30 -04:00
parent b7e7d5b936
commit 10e8d1898d
8 changed files with 140 additions and 47 deletions

View file

@ -1,12 +1,18 @@
use strict;
use Plack::Builder;
use lib '/data/WebGUI/lib';
use WebGUI;
# Some ways to achieve the same thing from the command line:
# plackup -MWebGUI -e 'WebGUI->new'
# plackup -MWebGUI -e 'WebGUI->new("dev.localhost.localdomain.conf")'
# plackup -MWebGUI -e 'WebGUI->new(root => "/data/WebGUI", site => "dev.localhost.localdomain.conf")'
#
# Or from a .psgi file:
# my $app = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' )->psgi_app;
# Or equivalently (using the defaults):
WebGUI->new;
my $wg = WebGUI->new( root => '/data/WebGUI', site => 'dev.localhost.localdomain.conf' );
builder {
# Open/close the WebGUI::Session at the outer-most onion layer
enable '+WebGUI::Middleware::Session', config => $wg->config;
# Any additional WebGUI Middleware goes here
# ..
# Return the app
$wg;
};