checkpoint

This commit is contained in:
Patrick Donelan 2009-10-09 22:11:01 +11:00
parent dc60102f8d
commit da75a8b207
4 changed files with 14 additions and 4 deletions

View file

@ -13,6 +13,8 @@ my $app = sub {
my $env = shift;
$env->{'wg.WEBGUI_ROOT'} = $WEBGUI_ROOT;
$env->{'wg.WEBGUI_CONFIG'} = "$WEBGUI_CONFIG.conf";
$env->{'wg.DIR_CONFIG.WebguiRoot'} = $env->{'wg.WEBGUI_ROOT'};
$env->{'wg.DIR_CONFIG.WebguiConfig'} = $env->{'wg.WEBGUI_CONFIG'};
WebGUI::handle_psgi($env);
};

View file

@ -2,6 +2,7 @@ package WebGUI::Session::Plack;
use strict;
use warnings;
use Carp;
=head1 DESCRIPTION
@ -58,7 +59,7 @@ sub pnotes {
sub push_handlers {
my $self = shift;
my ($x, $sub) = @_;
warn "push_handlers on $x";
carp "push_handlers on $x";
return $sub->();
}
#
@ -78,6 +79,8 @@ sub new {
bless { @_ }, $class;
}
sub env { shift->{env} }
our $AUTOLOAD;
sub AUTOLOAD {
my $self = shift;
@ -88,6 +91,12 @@ sub AUTOLOAD {
return;
}
sub dir_config {
my $self = shift;
my $c = shift;
return $self->env->{"wg.DIR_CONFIG.$c"};
}
# --
## CGI request are _always_ main, and there is never a previous or a next

View file

@ -5,8 +5,8 @@ use warnings;
=head1 DESCRIPTION
This class wraps calls to $session->request and logs them so that we know
what is left to do to finish Plack support
This class wraps calls to $session->request and logs them as a cute way of seeing
what Apache2::* methods webgui is calling
=cut

View file

@ -62,7 +62,6 @@ to the user, instead of displaying the Page Not Found page.
sub handler {
my ($request, $server, $config) = @_;
$request->push_handlers(PerlResponseHandler => sub {
my $session = $request->pnotes('wgSession');
unless (defined $session) {