summaryrefslogtreecommitdiffstats
path: root/lib/Narwhal.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Narwhal.pm')
-rw-r--r--lib/Narwhal.pm11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Narwhal.pm b/lib/Narwhal.pm
index 5f0eff3..0a7a24e 100644
--- a/lib/Narwhal.pm
+++ b/lib/Narwhal.pm
@@ -4,7 +4,16 @@ use Narwhal::RouteBuilder::HTTPMethod;
with 'OX::Role::WithAppRoot';
-config kioku_dsn => 'dbi:SQLite:narwhal.db';
+has dsn => (
+ is => 'ro',
+ isa => 'Str',
+ default => 'dbi:SQLite:narwhal.db',
+);
+
+config kioku_dsn => sub {
+ my ($s, $app) = @_;
+ $app->dsn;
+};
config kioku_extra_args => sub { { create => 1 } };
config template_root => sub {
shift->param('app_root')->subdir('root', 'templates')