aboutsummaryrefslogtreecommitdiff
path: root/s/masterinterface.pl
blob: 253ff931c75c56bc84a736d749b115184d9f773c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/perl
package MasterWebInterface;
use strict;
use warnings;
use Data::Dumper 'Dumper';
use Cwd 'abs_path';

our $ROOT;
BEGIN { ($ROOT = abs_path $0) =~ s{/s/masterinterface.pl$}{}; }
use lib $ROOT.'/lib';
use TUWF;

# get settings and add these to the TUWF object
our %S = (root => $ROOT);
require "$ROOT/data/settings.pl";


$TUWF::OBJ->{$_} = $S{$_} for (keys %S);

# TUWF options
TUWF::set(
  logfile               => "$ROOT/log/TUWF.log",
  mail_from             => $S{email},
  db_login              => $S{db_login},
  validate_templates => { # input templates
    page  => { template => 'uint', max => 1000 },
  },
  log_queries           => 0,
  debug                 => 1,
);

#add %S from web-config.pl to OBJ
$TUWF::OBJ->{$_} = $S{$_} for (keys %S);

TUWF::load_recursive('MasterWebInterface');
TUWF::run();