X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/cff913a1c984f82558a7d59dec0b8b1a06c5530d..d1f44c84d990f57982854c6a4716c0f233f45bca:/SL/LxOfficeConf.pm 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;