1 package SL::LxOfficeConf;
 
   9   my ($class, $file_name) = @_;
 
  11   read_config 'config/lx_office.conf.default' => %::lx_office_conf;
 
  12   _decode_recursively(\%::lx_office_conf);
 
  14   $file_name ||= 'config/lx_office.conf';
 
  17     read_config $file_name => my %local_conf;
 
  18     _decode_recursively(\%local_conf);
 
  19     _flat_merge(\%::lx_office_conf, \%local_conf);
 
  23 sub _decode_recursively {
 
  26   while (my ($key, $value) = each %{ $obj }) {
 
  27     if (ref($value) eq 'HASH') {
 
  28       _decode_recursively($value);
 
  30       $obj->{$key} = decode('UTF-8', $value);
 
  38   while (my ($key, $value) = each %{ $src }) {
 
  39     if (!exists $dst->{$key}) {
 
  40       $dst->{$key} = $value;
 
  43       map { $dst->{$key}->{$_} = $value->{$_} } keys %{ $value };