projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7e5509
)
installation_check.pl: LxOfficeConf safe_require gefixt
author
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 29 Dec 2016 11:45:28 +0000
(12:45 +0100)
committer
Sven Schöling
<s.schoeling@linet-services.de>
Thu, 29 Dec 2016 11:45:28 +0000
(12:45 +0100)
SL/LxOfficeConf.pm
patch
|
blob
|
history
diff --git
a/SL/LxOfficeConf.pm
b/SL/LxOfficeConf.pm
index
588e87f
..
f6ae49e
100644
(file)
--- 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;