NAME

Positron - a family of templating and markup modules

VERSION

version v0.0.1

SYNOPSIS

use Positron;

my $template = Positron::Template->new();

my $dom    = create_dom_tree();
my $data   = { foo => 'bar', baz => [ 1, 2, 3 ] };
my $result = $template->process($dom, $data); 

DESCRIPTION

Positron is a family of templating and markup modules. The module Positron itself is an umbrella module which simply requires all the other modules, but you can also load them all separately.

Warning: this is still alpha software at best. Things can and will change, in backwards incompatible and inconvenient ways.

MAIN MODULES

These are the modules you will most likely be using.

Positron::DataTemplate

Positron::DataTemplate is a templating system for plain data. It accepts plain data as templates, i.e. nested lists and hashes, and transforms them using the passed template parameters (the "environment") into even more plain data. If this sounds confusing, please check the module itself for examples.

SUPPORTING MODULES

Positron::Environment

Positron::Environment represents a set of template parameters, a mapping between keys and values for evaluating the template. This is very similar to a plain hash, but with an additional parent mechanism for forming a hierarchical stack of environments.

Positron::Expression

Positron::Expression implements a simple language for template parameter evaluation. Instead of only looking up values with plain keys, expressions can be hash lookups, method calls, or literal strings.