From f2cee1250cf2604954dbc8fac64f0d1643393ecd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 29 Dec 2016 12:45:28 +0100 Subject: [PATCH] installation_check.pl: LxOfficeConf safe_require gefixt --- SL/LxOfficeConf.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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; -- 2.20.1