diff --git a/etc/dev.localhost.localdomain.psgi b/etc/dev.localhost.localdomain.psgi index 4e5dad288..4591416da 100644 --- a/etc/dev.localhost.localdomain.psgi +++ b/etc/dev.localhost.localdomain.psgi @@ -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); }; diff --git a/lib/WebGUI/Session/Plack.pm b/lib/WebGUI/Session/Plack.pm index 71ca347d9..49ab5f62e 100644 --- a/lib/WebGUI/Session/Plack.pm +++ b/lib/WebGUI/Session/Plack.pm @@ -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 diff --git a/lib/WebGUI/Session/Request.pm b/lib/WebGUI/Session/Request.pm index 88ae0835d..3c1cc87a3 100644 --- a/lib/WebGUI/Session/Request.pm +++ b/lib/WebGUI/Session/Request.pm @@ -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 diff --git a/lib/WebGUI/URL/Content.pm b/lib/WebGUI/URL/Content.pm index 5102946b8..14a2d8fd4 100644 --- a/lib/WebGUI/URL/Content.pm +++ b/lib/WebGUI/URL/Content.pm @@ -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) {