blob: 6086f0fc72e15be76799bae60f56a6d9fc29eab3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package Spreadsheet::Template::Processor::Xslate;
use Moose;
use Text::Xslate;
with 'Spreadsheet::Template::Processor';
has xslate => (
is => 'ro',
isa => 'Text::Xslate',
lazy => 1,
default => sub { Text::Xslate->new },
);
sub process {
my $self = shift;
my ($contents, $vars) = @_;
return $self->xslate->render_string($contents, $vars);
}
__PACKAGE__->meta->make_immutable;
no Moose;
1;
|