Text::DumbTemplate - Yet another template system, this one's dumb but fast
This document describes version 0.002 of Text::DumbTemplate (from Perl distribution Text-DumbTemplate), released on 2017-08-16.
use Text::DumbTemplate; my $td = Text::DumbTemplate->new( ); $td->template(<<'_'); Hello, good [%= greeting %]! My name is [%= name %]. I am [%= age %] year(s) old. Nice to meet you. _ $td->var(greeting => 'morning'); $td->var(name => 'Ujang'); $td->var(age => 25); print $td->process;
EARLY, EXPERIMENTAL, PROOF OF CONCEPT.
This is a very simple template module. One thing that's unique about this module is: it compiles template to a sprintf format instead of Perl subroutines. The upside: it's blazing fast (e.g. several times faster than Template::Compiled for small/simple template).
sprintf
Please visit the project's homepage at https://metacpan.org/release/Text-DumbTemplate.
Source repository is at https://github.com/perlancar/perl-Text-DumbTemplate.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Text-DumbTemplate
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
Text::sprintfn
Text::Table::Tiny which also harness the power of sprintf to draw text tables.
perlancar <perlancar@cpan.org>
This software is copyright (c) 2017 by perlancar@cpan.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Text::DumbTemplate, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::DumbTemplate
CPAN shell
perl -MCPAN -e shell install Text::DumbTemplate
For more information on module installation, please visit the detailed CPAN module installation guide.