summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/global.pl23
-rw-r--r--lib/VNDB/Handler/Home.pm22
-rwxr-xr-xutil/vndb.pl35
3 files changed, 80 insertions, 0 deletions
diff --git a/data/global.pl b/data/global.pl
new file mode 100644
index 00000000..f2c12909
--- /dev/null
+++ b/data/global.pl
@@ -0,0 +1,23 @@
+
+package VNDB;
+
+our(%O, %S, $ROOT);
+
+
+# options for YAWF
+our %O = (
+ db_login => [ 'dbi:Pg:dbname=vndb', 'vndb', 'passwd' ],
+ debug => 1,
+ logfile => $ROOT.'/data/log/vndb.log',
+);
+
+
+# VNDB-specific options (object_data)
+our %S = (
+ version => 'beta',
+);
+
+
+# allow the settings to be overwritten in config.pl
+require $ROOT.'/data/config.pl' if -f $ROOT.'/data/config.pl';
+
diff --git a/lib/VNDB/Handler/Home.pm b/lib/VNDB/Handler/Home.pm
new file mode 100644
index 00000000..f48651b1
--- /dev/null
+++ b/lib/VNDB/Handler/Home.pm
@@ -0,0 +1,22 @@
+
+package VNDB::Handler::Home;
+
+
+use strict;
+use warnings;
+use YAWF ':html';
+
+
+YAWF::register(
+ qr{^$}, \&homepage,
+);
+
+
+sub homepage {
+ my $self = shift;
+
+ lit 'Output';
+}
+
+1;
+
diff --git a/util/vndb.pl b/util/vndb.pl
new file mode 100755
index 00000000..a076dcc8
--- /dev/null
+++ b/util/vndb.pl
@@ -0,0 +1,35 @@
+#!/usr/bin/perl
+
+
+package VNDB;
+
+use strict;
+use warnings;
+
+
+use Cwd 'abs_path';
+our $ROOT;
+BEGIN { ($ROOT = abs_path $0) =~ s{/util/vndb\.pl$}{}; }
+
+
+use lib $ROOT.'/yawf/lib';
+use lib $ROOT.'/lib';
+
+
+use YAWF;
+
+
+our(%O, %S);
+
+
+# load settings from global.pl
+require $ROOT.'/data/global.pl';
+
+
+YAWF::init(
+ %O,
+ namespace => 'VNDB',
+ object_data => \%S
+);
+
+