use SL::Locale;
use SL::LXDebug;
use Data::Dumper;
+use SL::Layout::None;
use SL::LxOfficeConf;
use SL::InstanceConfiguration;
-SL::LxOfficeConf->read;
+use SL::Request;
sub _login {
my $login = shift;
package main;
- $::lxdebug = LXDebug->new(file => \*STDERR);
+ $::lxdebug = LXDebug->new(target => LXDebug::STDERR_TARGET);
+ $::lxdebug->disable_sub_tracing;
$::locale = Locale->new($::lx_office_conf{system}->{language});
$::form = Form->new;
$::auth = SL::Auth->new;
$::instance_conf = SL::InstanceConfiguration->new;
- $::request = { cgi => CGI->new({}) };
+ $::request = SL::Request->new( cgi => CGI->new({}), layout => SL::Layout::None->new );
die 'cannot reach auth db' unless $::auth->session_tables_present;
}
sub login {
+ SL::LxOfficeConf->read;
+
my $login = shift || $::lx_office_conf{testing}{login} || 'demo';
_login($login);
}