summary refs log tree commit diff
diff options
context:
space:
mode:
authorFayland Lam <fayland@gmail.com>2011-11-25 23:43:11 +0800
committerFayland Lam <fayland@gmail.com>2011-11-25 23:43:11 +0800
commitd9fa17c560f902dc7358fcbd8a2d1f40b2b42810 (patch)
tree32f974571426bae15ca1712896eed4a2caf53604
parentfix for windows and header/footer args (diff)
downloaddancer-template-xslate-d9fa17c560f902dc7358fcbd8a2d1f40b2b42810.tar.gz
set extension when suffix is set
-rw-r--r--lib/Dancer/Template/Xslate.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Dancer/Template/Xslate.pm b/lib/Dancer/Template/Xslate.pm
index 50f2286..ed26c4a 100644
--- a/lib/Dancer/Template/Xslate.pm
+++ b/lib/Dancer/Template/Xslate.pm
@@ -26,6 +26,9 @@ sub init {
     my $view_dir = setting('views');
     push @{$args{path}}, $view_dir unless grep { $_ eq $view_dir } @{$args{path}};
     
+    ## for those people read Text::Xslate instead of Dancer::Template::Abstract
+    $self->config->{extension} = $args{suffix} if exists $args{suffix};
+    
     $_engine = Text::Xslate->new(%args);
 }