Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 67b21d42

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

  • ID 67b21d425476471298e0b2e3f5dcacc025ebaaaf
  • Vorgänger 2c1c6a9a
  • Nachfolger a99b261f

config/lx_office.conf.default einlesen, wenn config/lx_office.conf nicht existiert

Unterschiede anzeigen:

scripts/console
9 9
  push    @INC, "modules/fallback"; # Only use our own versions of modules if there's no system version.
10 10
}
11 11

  
12
use Config::Std;
13 12
use Data::Dumper;
14 13
use Devel::REPL 1.002001;
15 14
use Term::ReadLine::Perl::Bind;     # use sane key binding for rxvt users
16 15

  
17
read_config 'config/lx_office.conf' => my %config;
16
use SL::LxOfficeConf;
17
SL::LxOfficeConf->read;
18 18

  
19
my $login        = shift || $config{Console}{login}        || 'demo';
20
my $history_file =          $config{Console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
21
my $autorun      =          $config{Console}{autorun};
19
my $login        = shift || $::lx_office_conf{console}{login}        || 'demo';
20
my $history_file =          $::lx_office_conf{console}{history_file} || '/tmp/lxoffice_console_history.log'; # fallback if users is not writable
21
my $autorun      =          $::lx_office_conf{console}{autorun};
22 22

  
23 23
# will be configed eventually
24 24
my @plugins      = qw(History LexEnv Colors MultiLine::PPI FancyPrompt PermanentHistory AutoloadModules);
......
41 41
use CGI qw( -no_xhtml);
42 42
use DateTime;
43 43
use SL::Auth;
44
use SL::Dispatcher;
45 44
use SL::Form;
46 45
use SL::Helper::DateTime;
47 46
use SL::Locale;
......
59 58

  
60 59
  package main;
61 60

  
62
  read_config 'config/lx_office.conf' => %::lx_office_conf;
63
  SL::Dispatcher::_decode_recursively(\%::lx_office_conf);
64

  
65 61
  $::lxdebug = LXDebug->new;
66 62
  $::locale = Locale->new($::lx_office_conf{system}->{language});
67 63
  $::cgi    = CGI->new qw();

Auch abrufbar als: Unified diff