From a866fd10f0cd694a4b58845d0bf629120895d017 Mon Sep 17 00:00:00 2001 From: Patrick Donelan Date: Tue, 6 Apr 2010 20:05:07 -0400 Subject: [PATCH] Added contentHandlers short-circuit for benchmarking PSGI vs. modperl --- lib/WebGUI.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index f8b6eef09..21531008e 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -124,6 +124,11 @@ sub dispatch { # Instantiate the session object my $session = $self->session( WebGUI::Session->open($self->root, $config, $request, $sessionId) ); + # Short-circuit contentHandlers - for benchmarking PSGI scaffolding vs. modperl + $session->close; + $session->output->print('WebGUI PSGI with contentHandlers short-circuited for benchmarking'); + return $session->response->finalize; + for my $handler (@{$config->get("contentHandlers")}) { my $output = eval { WebGUI::Pluggable::run($handler, "handler", [ $session ] )}; if ( my $e = WebGUI::Error->caught ) {