summary refs log tree commit diff
path: root/lib/Dancer/Template/Xslate.pm
diff options
context:
space:
mode:
authorYusuke Watase <ywatase@gmail.com>2012-04-12 19:37:12 +0900
committerYusuke Watase <ywatase@gmail.com>2012-04-12 19:37:12 +0900
commitc00dffcb11d9d25b7b56840a668356f003c88810 (patch)
tree54c6692251018bd14fccfd75516d9ed96806e08d /lib/Dancer/Template/Xslate.pm
parentcheckin before tagging (diff)
downloaddancer-template-xslate-c00dffcb11d9d25b7b56840a668356f003c88810.tar.gz
fix extention and suffix problem
Diffstat (limited to 'lib/Dancer/Template/Xslate.pm')
-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 74f4c18..9777ee9 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);