Revision 1feda885
Von Moritz Bunkus vor etwa 12 Jahren hinzugefügt
SL/LxOfficeConf.pm | ||
---|---|---|
2 | 2 |
|
3 | 3 |
use strict; |
4 | 4 |
|
5 |
use Encode; |
|
6 |
|
|
5 | 7 |
my $environment_initialized; |
6 | 8 |
|
7 | 9 |
sub safe_require { |
8 | 10 |
my ($class, $may_fail); |
9 |
my $failed; |
|
10 |
$failed = !eval { |
|
11 |
require Config::Std; |
|
12 |
require Encode; |
|
13 |
}; |
|
11 |
|
|
12 |
my $failed = !eval { require Config::Std; }; |
|
14 | 13 |
|
15 | 14 |
if ($failed) { |
16 | 15 |
if ($may_fail) { |
... | ... | |
22 | 21 |
} |
23 | 22 |
|
24 | 23 |
Config::Std->import; |
25 |
Encode->import; |
|
26 | 24 |
|
27 | 25 |
return 1; |
28 | 26 |
} |
Auch abrufbar als: Unified diff
Basis-Module ("Encode") normal mit "use" laden