Jesse Luehrs > Spreadsheet-Template-0.01 > Spreadsheet::Template::Processor::Xslate

Download:
Spreadsheet-Template-0.01.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Module Version: 0.01   Source   Latest Release: Spreadsheet-Template-0.03

NAME ^

Spreadsheet::Template::Processor::Xslate - preprocess templates with Xslate

VERSION ^

version 0.01

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 c helper. $name is the name to use for the format, and $options is a hashref to use as the value for the format entry in the cell.

c($contents, $format, $type, %args)

Returns the representation of a cell. $contents is the cell contents, $format is either the name of a format declared with the format helper, or a hashref of format options, $type is either "string", "number", or "date_time", and %args contains any other parameters (such as formula, for instance) to declare for the cell. $type is optional, and if not passed, defaults to "string".

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) 2013 by Jesse Luehrs.

This is free software, licensed under:

  The MIT (X11) License
syntax highlighting: