diff options
| author | Richard Simões <rsimoes@cpan.org> | 2012-04-12 17:16:33 -0700 |
|---|---|---|
| committer | Richard Simões <rsimoes@cpan.org> | 2012-04-12 17:16:33 -0700 |
| commit | 1f80f14f6ee1a79461e65d3f56dc570adbfc1d53 (patch) | |
| tree | 96b364be451614525629295b66e154d9d41b36ca /lib/Dancer | |
| parent | Bump version to 0.03, change issue tracker and homepage URLs (diff) | |
| parent | fix extention and suffix problem (diff) | |
| download | dancer-template-xslate-1f80f14f6ee1a79461e65d3f56dc570adbfc1d53.tar.gz | |
Merge pull request #5 from ywatase/fix_extention_problem
fix extension and suffix problem
Diffstat (limited to 'lib/Dancer')
| -rw-r--r-- | lib/Dancer/Template/Xslate.pm | 4 |
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); |
