Revision 67b21d42
Von Moritz Bunkus vor fast 14 Jahren hinzugefügt
SL/Dispatcher.pm | ||
---|---|---|
15 | 15 |
use English qw(-no_match_vars); |
16 | 16 |
use SL::Auth; |
17 | 17 |
use SL::LXDebug; |
18 |
use SL::LxOfficeConf; |
|
18 | 19 |
use SL::Locale; |
19 | 20 |
use SL::Common; |
20 | 21 |
use SL::Helper::DateTime; |
... | ... | |
66 | 67 |
} |
67 | 68 |
|
68 | 69 |
sub pre_startup_setup { |
69 |
read_config 'config/lx_office.conf' => %::lx_office_conf; |
|
70 |
_decode_recursively(\%::lx_office_conf); |
|
70 |
SL::LxOfficeConf->read; |
|
71 | 71 |
_init_environment(); |
72 | 72 |
|
73 | 73 |
eval { |
... | ... | |
312 | 312 |
return $self->{interface} =~ m/f(?:ast)cgi/i ? $self->{request}->GetHandles() : (\*STDIN, \*STDOUT, \*STDERR); |
313 | 313 |
} |
314 | 314 |
|
315 |
sub _decode_recursively { |
|
316 |
my ($obj) = @_; |
|
317 |
|
|
318 |
while (my ($key, $value) = each %{ $obj }) { |
|
319 |
if (ref($value) eq 'HASH') { |
|
320 |
_decode_recursively($value); |
|
321 |
} else { |
|
322 |
$obj->{$key} = decode('UTF-8', $value); |
|
323 |
} |
|
324 |
} |
|
325 |
} |
|
326 |
|
|
327 | 315 |
sub _init_environment { |
328 | 316 |
my %key_map = ( lib => { name => 'PERL5LIB', append_path => 1 }, |
329 | 317 |
path => { name => 'PATH', append_path => 1 }, |
Auch abrufbar als: Unified diff
config/lx_office.conf.default einlesen, wenn config/lx_office.conf nicht existiert