X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLxOfficeConf.pm;h=f6ae49ef07d8bfa3b76fe3d6a3dc9ee9a94a24fd;hb=991369b17d679e2855f4d5086d0b9769dc2ae1aa;hp=588e87f8bd215b035df674d5926ad809bc3830f6;hpb=cff913a1c984f82558a7d59dec0b8b1a06c5530d;p=kivitendo-erp.git 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;