From 4aae3132de0ff117290cdc5a8cebeb5bf467942f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 26 Apr 2011 19:12:29 +0000 Subject: s/config/$config/ --- Xerl.pm | 10 ++++------ Xerl/Page/Parameter.pm | 6 +++--- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Xerl.pm b/Xerl.pm index bade547..2510823 100644 --- a/Xerl.pm +++ b/Xerl.pm @@ -56,6 +56,7 @@ sub run($) { Xerl::Page::Configure->new( config => $self->get_config(), %$request ); $config->parse(); + return undef if $config->shutdown_exists(); # TODO: Plugin API unless ( $config->sessionsdisable_exists() ) { @@ -70,12 +71,14 @@ sub run($) { Xerl::Page::Parameter->new( config => $config ); $parameter->parse(); + return undef if $config->shutdown_exists(); if ( $config->document_exists() ) { my Xerl::Page::Document $document = Xerl::Page::Document->new( config => $config ); $document->parse(); + return undef if $config->shutdown_exists(); } else { @@ -83,15 +86,10 @@ sub run($) { Xerl::Page::Templates->new( config => $config ); $templates->parse(); + return undef if $config->shutdown_exists(); $templates->print($time); } - - # This function gets always called if the scripts ends. - # The script may also end on another location. - Xerl::Main::Global::SHUTDOWN(); - - # Never reach this point return undef; } diff --git a/Xerl/Page/Parameter.pm b/Xerl/Page/Parameter.pm index e751de2..c50608c 100644 --- a/Xerl/Page/Parameter.pm +++ b/Xerl/Page/Parameter.pm @@ -46,12 +46,12 @@ sub parse($) { if ( $config->href_exists() ) { print "Location: ", $config->get_href(), "\n\n"; - config->set_shutdown(1); + $config->set_shutdown(1); } elsif ( $config->env_exists() ) { print "Content-Type: text/plain\n\n"; print "$_=", $ENV{$_}, "\n" for keys %ENV; - config->set_shutdown(1); + $config->set_shutdown(1); } if ( $config->devel_exists() ) { @@ -62,7 +62,7 @@ sub parse($) { if ( $config->conf_exists() ) { print "Content-Type: text/plain\n\n"; print "$_=", $config->{$_}, "\n" for keys %$config; - config->set_shutdown(1); + $config->set_shutdown(1); } return $self; -- cgit v1.2.3