Why not adopt me?
NAME
Spreadsheet::Template::Processor::Xslate - preprocess templates with Xslate
VERSION
version 0.05
SYNOPSIS
my $template = Spreadsheet::Template->new(
processor_class => 'Spreadsheet::Template::Processor::Xslate',
processor_options => {
syntax => 'TTerse'
},
);
DESCRIPTION
This class implements Spreadsheet::Template::Processor to run the template data through Text::Xslate. In addition to allowing you to use the provided variables, it also provides some convenience macros to use when writing your templates:
- format($name, $options)
-
Declares a named format, which can be used with the
chelper.$nameis the name to use for the format, and$optionsis a hashref to use as the value for theformatentry in the cell. - c($contents, $format, $type, %args)
-
Returns the representation of a cell.
$contentsis the cell contents,$formatis either the name of a format declared with theformathelper, or a hashref of format options,$typeis either"string","number", or"date_time", and%argscontains any other parameters (such asformula, for instance) to declare for the cell.$typeis optional, and if not passed, defaults to"string". - merge($range, $content, $format, $type, %args)
-
Returns representation of a range of cells to be merged.
$content,$format,$type, and%argsare identical to the parameters listed above for thechelper, and$rangedescribes the range of cells to be merged. The range can be specified either by an array of two arrays corresponding to the row and column indices of the top left and bottom right cell, or by an Excel-style range (likeA1:C3). - true
-
Returns
JSON::true. - false
-
Returns
JSON::false.
ATTRIBUTES
syntax
Which Xslate syntax engine to use. Defaults to Metakolon.
AUTHOR
Jesse Luehrs <doy@tozt.net>
COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by Jesse Luehrs.
This is free software, licensed under:
The MIT (X11) License