diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-07-02 11:23:39 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-07-02 11:23:39 -0400 |
commit | 7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda (patch) | |
tree | 6ffff332f18964bfc4e3df3625d810ad7aff8d12 | |
parent | e99fa320ad6c3d3aa8b3a816a1ab4034a7f37247 (diff) | |
download | spreadsheet-template-7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda.tar.gz spreadsheet-template-7468bbccc24d2c8bec3d0d29c85a9c2e68b78eda.zip |
default to TTerse syntax (but make it configurable)
-rw-r--r-- | lib/Spreadsheet/Template/Processor/Xslate.pm | 14 |
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 { |