Fix syntax error inside ErrorHandler.
Add DESTROY method to Config.pm Change Session::close so that it doesn't destroy things that don't exist (like _server) and destroys the logger last so we can log all errors.
This commit is contained in:
parent
cc370e180f
commit
8fade0f1d5
3 changed files with 11 additions and 4 deletions
|
|
@ -186,7 +186,10 @@ sub readAllConfigs {
|
||||||
return \%configs;
|
return \%configs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub DESTROY {
|
||||||
|
my ($self) = @_;
|
||||||
|
undef $self;
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ use WebGUI::Session::Stow;
|
||||||
use WebGUI::Session::Style;
|
use WebGUI::Session::Style;
|
||||||
use WebGUI::Session::Url;
|
use WebGUI::Session::Url;
|
||||||
use WebGUI::Session::Var;
|
use WebGUI::Session::Var;
|
||||||
|
use Data::Dumper;
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
|
|
@ -113,9 +113,13 @@ Cleans up a WebGUI session information from memory and disconnects from any reso
|
||||||
|
|
||||||
sub close {
|
sub close {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
##Must destroy the logger last!
|
||||||
|
my %keys = grep { $_ ne '_errorHandler' } keys %{ $self };
|
||||||
foreach my $object (keys %{$self}) {
|
foreach my $object (keys %{$self}) {
|
||||||
$self->{$object}->DESTROY;
|
##Don't destroy things that don's exist
|
||||||
|
$self->{$object} and $self->{$object}->DESTROY;
|
||||||
}
|
}
|
||||||
|
$self->{_errorHandler} and $self->{_errorHandler}->DESTROY;
|
||||||
undef $self;
|
undef $self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -379,7 +379,7 @@ sub warn {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $message = shift;
|
my $message = shift;
|
||||||
$self->getLogger->warn($message);
|
$self->getLogger->warn($message);
|
||||||
$self->{_session}->stow->set("debug_warn") = $self->{_session}->stow->get("debug_warn").$message."\n";
|
$self->{_session}->stow->set("debug_warn", $self->{_session}->stow->get("debug_warn").$message."\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue