summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-04-26 19:12:29 +0000
committerPaul Buetow <paul@buetow.org>2011-04-26 19:12:29 +0000
commit4aae3132de0ff117290cdc5a8cebeb5bf467942f (patch)
treeec63493694735a04f7eb345991f15e0f11537750
parent67855afa02636e06b142c706487c5eb23efc5e8c (diff)
s/config/$config/
-rw-r--r--Xerl.pm10
-rw-r--r--Xerl/Page/Parameter.pm6
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;