From: Sven Schöling Date: Thu, 29 Dec 2016 11:45:28 +0000 (+0100) Subject: installation_check.pl: LxOfficeConf safe_require gefixt X-Git-Tag: release-3.5.4~1774 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f2cee1250cf2604954dbc8fac64f0d1643393ecd;p=kivitendo-erp.git installation_check.pl: LxOfficeConf safe_require gefixt --- diff --git a/SL/LxOfficeConf.pm b/SL/LxOfficeConf.pm index 588e87f8b..f6ae49ef0 100644 --- a/SL/LxOfficeConf.pm +++ b/SL/LxOfficeConf.pm @@ -3,23 +3,24 @@ package SL::LxOfficeConf; use strict; use Encode; -use SL::System::Process; my $environment_initialized; sub safe_require { - my ($class, $may_fail); + my ($class, $may_fail) = @_; - my $failed = !eval { require Config::Std; }; - - if ($failed) { + eval { + require Config::Std; + require SL::System::Process; + 1; + } or do { if ($may_fail) { warn $@; return 0; } else { die $@; } - } + }; Config::Std->import;