blob: e86b10648c1550512ee37b2e8561ba789a851dec (
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(type => 'text') },
);
sub process {
my $self = shift;
my ($contents, $vars) = @_;
return $self->xslate->render_string($contents, $vars);
}
__PACKAGE__->meta->make_immutable;
no Moose;
1;
|