summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-07-02 11:23:39 -0400
committerJesse Luehrs <doy@tozt.net>2013-07-02 11:23:39 -0400
commit7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda (patch)
tree6ffff332f18964bfc4e3df3625d810ad7aff8d12
parente99fa320ad6c3d3aa8b3a816a1ab4034a7f37247 (diff)
downloadspreadsheet-template-7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda.tar.gz
spreadsheet-template-7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda.zip
default to TTerse syntax (but make it configurable)
-rw-r--r--lib/Spreadsheet/Template/Processor/Xslate.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/Spreadsheet/Template/Processor/Xslate.pm b/lib/Spreadsheet/Template/Processor/Xslate.pm
index e86b106..d5c89d4 100644
--- a/lib/Spreadsheet/Template/Processor/Xslate.pm
+++ b/lib/Spreadsheet/Template/Processor/Xslate.pm
@@ -5,11 +5,23 @@ use Text::Xslate;
with 'Spreadsheet::Template::Processor';
+has syntax => (
+ is => 'ro',
+ isa => 'Str',
+ default => 'TTerse',
+);
+
has xslate => (
is => 'ro',
isa => 'Text::Xslate',
lazy => 1,
- default => sub { Text::Xslate->new(type => 'text') },
+ default => sub {
+ my $self = shift;
+ return Text::Xslate->new(
+ type => 'text',
+ syntax => $self->syntax
+ );
+ },
);
sub process {