From: Sven Schöling Date: Thu, 20 Jun 2013 17:01:13 +0000 (+0200) Subject: kein use SL::DB::Object in SL::DB::Object X-Git-Tag: release-3.1.0beta1~282 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7c60c2423f6fd27a78cf89ca62821ea1e41e85f5;p=kivitendo-erp.git kein use SL::DB::Object in SL::DB::Object --- diff --git a/SL/DB/BackgroundJob.pm b/SL/DB/BackgroundJob.pm index c83868502..f5c4b21f6 100644 --- a/SL/DB/BackgroundJob.pm +++ b/SL/DB/BackgroundJob.pm @@ -5,10 +5,8 @@ use strict; use DateTime::Event::Cron; use English qw(-no_match_vars); -require SL::DB::MetaSetup::BackgroundJob; -require SL::DB::Manager::BackgroundJob; - -require SL::DB::BackgroundJobHistory; +use SL::DB::MetaSetup::BackgroundJob; +use SL::DB::Manager::BackgroundJob; use SL::System::Process; @@ -36,6 +34,8 @@ sub run { my $run_at = DateTime->now_local; my $history; + require SL::DB::BackgroundJobHistory; + my $ok = eval { eval "require $package" or die $@; my $result = $package->new->run($self);