summaryrefslogtreecommitdiffstats
path: root/lib/Spreadsheet/Template.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Spreadsheet/Template.pm')
-rw-r--r--lib/Spreadsheet/Template.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/Spreadsheet/Template.pm b/lib/Spreadsheet/Template.pm
index 1000393..21e432c 100644
--- a/lib/Spreadsheet/Template.pm
+++ b/lib/Spreadsheet/Template.pm
@@ -11,12 +11,24 @@ has processor_class => (
default => 'Spreadsheet::Template::Processor::Xslate',
);
+has processor_options => (
+ is => 'ro',
+ isa => 'HashRef',
+ default => sub { {} },
+);
+
has writer_class => (
is => 'ro',
isa => 'Str',
default => 'Spreadsheet::Template::Writer::XLSX',
);
+has writer_options => (
+ is => 'ro',
+ isa => 'HashRef',
+ default => sub { {} },
+);
+
has processor => (
is => 'ro',
does => 'Spreadsheet::Template::Processor',
@@ -26,7 +38,7 @@ has processor => (
my $self = shift;
my $class = $self->processor_class;
load_class($class);
- return $class->new;
+ return $class->new($self->processor_options);
},
);
@@ -39,7 +51,7 @@ has writer => (
my $self = shift;
my $class = $self->writer_class;
load_class($class);
- return $class->new;
+ return $class->new($self->writer_options);
},
);