aboutsummaryrefslogtreecommitdiff
path: root/s/masterinterface.pl
diff options
context:
space:
mode:
Diffstat (limited to 's/masterinterface.pl')
-rwxr-xr-xs/masterinterface.pl37
1 files changed, 37 insertions, 0 deletions
diff --git a/s/masterinterface.pl b/s/masterinterface.pl
new file mode 100755
index 0000000..253ff93
--- /dev/null
+++ b/s/masterinterface.pl
@@ -0,0 +1,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();
+