Positron - a family of templating and markup modules
version v0.1.3
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);
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.
Positron
Warning: this is still alpha software at best. Things can and will change, in backwards incompatible and inconvenient ways.
These are the modules you will most likely be using.
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.
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.
parent
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.
Ben Deutsch, <ben at bendeutsch.de>
<ben at bendeutsch.de>
None known so far, though keep in mind that this is alpha software.
Please report any bugs or feature requests to bug-positron at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Positron. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-positron at rt.cpan.org
This module is part of the Positron distribution.
You can find documentation for this distribution with the perldoc command.
perldoc Positron
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Positron
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Positron
CPAN Ratings
http://cpanratings.perl.org/d/Positron
Search CPAN
http://search.cpan.org/dist/Positron/
Copyright 2013 Ben Deutsch. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://dev.perl.org/licenses/ for more information.
To install Positron, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Positron
CPAN shell
perl -MCPAN -e shell install Positron
For more information on module installation, please visit the detailed CPAN module installation guide.