summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Narwhal.pm9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Narwhal.pm b/lib/Narwhal.pm
index 121cd2c..7766910 100644
--- a/lib/Narwhal.pm
+++ b/lib/Narwhal.pm
@@ -1,6 +1,8 @@
package Narwhal;
use OX;
+use MooseX::Types::Path::Class;
+
with 'OX::Role::WithAppRoot';
has kioku_dsn => (
@@ -16,9 +18,10 @@ has kioku_extra_args => (
);
has template_root => (
- is => 'ro',
- isa => 'Str',
- block => sub { shift->param('app_root')->subdir('root', 'templates') },
+ is => 'ro',
+ isa => 'Path::Class::Dir',
+ coerce => 1,
+ block => sub { shift->param('app_root')->subdir('root', 'templates') },
dependencies => ['app_root'],
);