Skip to content
Snippets Groups Projects
Commit 86f9914d authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

bless object into class earlier, to handle graceful exit

parent b9b4db3a
Branches
Tags
No related merge requests found
...@@ -47,6 +47,7 @@ sub new { ...@@ -47,6 +47,7 @@ sub new {
my $self = { my $self = {
configuration => $args{configuration}, configuration => $args{configuration},
}; };
bless $self, $pkg;
if ($self->{configuration}->{logger}) { if ($self->{configuration}->{logger}) {
Log::Any::Adapter->set( Log::Any::Adapter->set(
...@@ -111,8 +112,6 @@ sub new { ...@@ -111,8 +112,6 @@ sub new {
$self->{db} = AccountManager::DB->new(); $self->{db} = AccountManager::DB->new();
bless $self, $pkg;
return $self; return $self;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment