summary refs log tree commit diff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Dancer/Template/Xslate.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Dancer/Template/Xslate.pm b/lib/Dancer/Template/Xslate.pm
index f2446b3..688a645 100644
--- a/lib/Dancer/Template/Xslate.pm
+++ b/lib/Dancer/Template/Xslate.pm
@@ -32,8 +32,10 @@ sub init {
     $self->config->{extension} = $xslate_args{suffix}
         if exists $xslate_args{suffix};
 
+    $self->config->{extension} =~ s/^\.//;
+
     ## avoid 'Text::Xslate: Unknown option(s): extension'
-    $xslate_args{suffix} = delete $xslate_args{extension}
+    $xslate_args{suffix} = '.' . delete $xslate_args{extension}
         if exists $xslate_args{extension};
 
     $self->{driver} = Text::Xslate->new(%xslate_args);