template
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 1068
Bee Template 0.3
Bee Template is a Web template system parses HTML files into PHP objects. more>> <<less
Download (0.004MB)
Added: 2005-06-27 License: GPL (GNU General Public License) Price:
1582 downloads
Template::Ast 0.02
Template::Ast is a Perl module to process ASTs for Perl Template Toolkit. more>>
Template::Ast is a Perl module to process ASTs for Perl Template Toolkit.
SYNOPSIS
use Template::Ast;
# Rebuild AST stored in file:
$ast = Template::Ast->read(foo.ast) or
die Template::Ast->error();
# Writing existing AST to file:
$ast = { Marry => [24, F], John => [21, M] };
Template::Ast->write($ast, foo.ast) or
die Template::Ast->error();
$ast = Template::Ast->merge([1,2,3], undef); # [1,2,3]
$ast = Template::Ast->merge(undef, [1,2,3]); # [1,2,3]
$ast = Template::Ast->merge(undef, undef); # undef
$ast = Template::Ast->merge({A=>1,B=>2}, [C]); # [C]
$ast = Template::Ast->merge([1,2,3], [5,6]); # [5,6]
$ast = Template::Ast->merge([{A=>1},2], 5); # 5
$ast = Template::Ast->merge({A=>1,B=>2}, {C=>3}); # {A=>1,B=>2,C=>3}
$ast = Template::Ast->merge({A=>1,B=>2}, {B=>3}); # {A=>1,B=>3}
# {A=>1,B=>2}
$ast = Template::Ast->merge({A=>1,B=>undef}, {A=>undef,B=>2});
Template::Ast->merge(
{A=>1,B=>{C=>1,D=>2}},
{B=>{C=>1,D=>3,E=>4}}
); # {A=>1,B=>{C=>1,D=>3,E=>4}}
Template::Ast->merge(
{A=>1,B=>{C=>[1,2]}},
{B=>{C=>[3,4]}}
); # {A=>1,B=>{C=>[3,4]}}
print Template::Ast->dump([$vars], [vars]);
ASTs are essential in the programming model based on Perl Template Toolkit. This module provides some easy interface to do the dirty work involved in AST handling. The term AST used here are referred to any Perl referece pointed to a complex data structure, such as a nested hash, a nested array, or such.
<<lessSYNOPSIS
use Template::Ast;
# Rebuild AST stored in file:
$ast = Template::Ast->read(foo.ast) or
die Template::Ast->error();
# Writing existing AST to file:
$ast = { Marry => [24, F], John => [21, M] };
Template::Ast->write($ast, foo.ast) or
die Template::Ast->error();
$ast = Template::Ast->merge([1,2,3], undef); # [1,2,3]
$ast = Template::Ast->merge(undef, [1,2,3]); # [1,2,3]
$ast = Template::Ast->merge(undef, undef); # undef
$ast = Template::Ast->merge({A=>1,B=>2}, [C]); # [C]
$ast = Template::Ast->merge([1,2,3], [5,6]); # [5,6]
$ast = Template::Ast->merge([{A=>1},2], 5); # 5
$ast = Template::Ast->merge({A=>1,B=>2}, {C=>3}); # {A=>1,B=>2,C=>3}
$ast = Template::Ast->merge({A=>1,B=>2}, {B=>3}); # {A=>1,B=>3}
# {A=>1,B=>2}
$ast = Template::Ast->merge({A=>1,B=>undef}, {A=>undef,B=>2});
Template::Ast->merge(
{A=>1,B=>{C=>1,D=>2}},
{B=>{C=>1,D=>3,E=>4}}
); # {A=>1,B=>{C=>1,D=>3,E=>4}}
Template::Ast->merge(
{A=>1,B=>{C=>[1,2]}},
{B=>{C=>[3,4]}}
); # {A=>1,B=>{C=>[3,4]}}
print Template::Ast->dump([$vars], [vars]);
ASTs are essential in the programming model based on Perl Template Toolkit. This module provides some easy interface to do the dirty work involved in AST handling. The term AST used here are referred to any Perl referece pointed to a complex data structure, such as a nested hash, a nested array, or such.
Download (0.020MB)
Added: 2007-06-29 License: Perl Artistic License Price:
847 downloads
Template Lite 2.10
Template Lite is a smaller, faster alternative to the Smarty template engine. more>>
Template Lite is a smaller, faster alternative to the Smarty template engine.
For the most part, it is a drop in replacement for Smarty but uses around half of the memory and is considerably faster and far less CPU intensive when compiling and displaying templates.
Template lite was originally created by Paul Lockaby as a smaller replacement for Smarty. The original package was called Smarty Light. Even though Smarty is an Open Source project the creators of Smarty decided to trademark the name Smarty. Because of this trademarking of the name they contacted Paul Lockaby and told him he could nolonger use Smarty in the name for the package.
Paul Lockaby gave me permission to fork the project if I wanted as he was closing down support and developement for Smarty Light. The initial release of Template Lite contains a few minor bug fixes and some extra features.
I plan on adding more features to Template Lite over the next few months. For the most part Template Lite is a drop in replacement for Smarty. The nice thing about this package is how it uses around half of the memory of Smarty and it is considerably FASTER and far less CPU intensive when compiling and displaying templates.
Enhancements:
- register_resource and unregister_resource support was added.
- Different resources are supported by everything except for cached template output.
- The _get_resource internal function was added for processing "file:" and absolute tag resources.
- The resize_image plugin was added.
- Support for absolute paths to template files was fixed.
<<lessFor the most part, it is a drop in replacement for Smarty but uses around half of the memory and is considerably faster and far less CPU intensive when compiling and displaying templates.
Template lite was originally created by Paul Lockaby as a smaller replacement for Smarty. The original package was called Smarty Light. Even though Smarty is an Open Source project the creators of Smarty decided to trademark the name Smarty. Because of this trademarking of the name they contacted Paul Lockaby and told him he could nolonger use Smarty in the name for the package.
Paul Lockaby gave me permission to fork the project if I wanted as he was closing down support and developement for Smarty Light. The initial release of Template Lite contains a few minor bug fixes and some extra features.
I plan on adding more features to Template Lite over the next few months. For the most part Template Lite is a drop in replacement for Smarty. The nice thing about this package is how it uses around half of the memory of Smarty and it is considerably FASTER and far less CPU intensive when compiling and displaying templates.
Enhancements:
- register_resource and unregister_resource support was added.
- Different resources are supported by everything except for cached template output.
- The _get_resource internal function was added for processing "file:" and absolute tag resources.
- The resize_image plugin was added.
- Support for absolute paths to template files was fixed.
Download (0.086MB)
Added: 2007-01-05 License: LGPL (GNU Lesser General Public License) Price:
1029 downloads
Template::FAQ 2.19
Template::FAQ contains Frequently Asked Questions about the Template Toolkit. more>>
Template::FAQ contains Frequently Asked Questions about the Template Toolkit.
Template Toolkit Language
Why doesnt [% a = b IF c %] work as expected?
Because the parser interprets it as
[% a = (b IF c) %]
Do this instead:
[% SET a = b IF c %]
If Im using TT to write out a TT template, is there a good way to escape [% and %]?
You can do this:
[% stag = "[%"
etag = "%]"
%]
and then:
[% stag; hello; etag %]
Or something like:
[% TAGS [- -] %]
[- INCLUDE foo -] # is a directive
[% INCLUDE foo %] # not a directive, just plain text, passed through
How do I iterate over a hash?
This is covered in the Template::Manual::VMethods section of the manual page. A list of all the keys that are in the hash can be obtained with the keys virtual method. You can then iterate over that list and by looking up each key in turn get the value.
[% FOREACH key = product.keys %]
[% key %] => [% product.$key %]
[% END %]
<<lessTemplate Toolkit Language
Why doesnt [% a = b IF c %] work as expected?
Because the parser interprets it as
[% a = (b IF c) %]
Do this instead:
[% SET a = b IF c %]
If Im using TT to write out a TT template, is there a good way to escape [% and %]?
You can do this:
[% stag = "[%"
etag = "%]"
%]
and then:
[% stag; hello; etag %]
Or something like:
[% TAGS [- -] %]
[- INCLUDE foo -] # is a directive
[% INCLUDE foo %] # not a directive, just plain text, passed through
How do I iterate over a hash?
This is covered in the Template::Manual::VMethods section of the manual page. A list of all the keys that are in the hash can be obtained with the keys virtual method. You can then iterate over that list and by looking up each key in turn get the value.
[% FOREACH key = product.keys %]
[% key %] => [% product.$key %]
[% END %]
Download (0.76MB)
Added: 2007-08-16 License: Perl Artistic License Price:
801 downloads
HTML::Template 2.9
HTML::Template module attempts to make using HTML templates simple and natural. more>>
HTML::Template module attempts to make using HTML templates simple and natural.
HTML::Template library extends standard HTML with a few new tags for variables, loops, if/else blocks and includes.
A file written with HTML and these new tags is called a template. Using this module you fill in the values for the variables and loops declared in the template.
This allows you to seperate design (the HTML) from the data, which you generate in the Perl script. While there are many other HTML template systems available, this module is simple and fast.
It doesnt try to reinvent Perl CGI, it just augments HTML with a few new and very useful abilities.
Enhancements:
- A new option was added to enforce Taint mode for unescaped variables.
- Several long-standing bugs were fixed.
- The enhanced tests produced by the Phalanx project are now part of the module.
<<lessHTML::Template library extends standard HTML with a few new tags for variables, loops, if/else blocks and includes.
A file written with HTML and these new tags is called a template. Using this module you fill in the values for the variables and loops declared in the template.
This allows you to seperate design (the HTML) from the data, which you generate in the Perl script. While there are many other HTML template systems available, this module is simple and fast.
It doesnt try to reinvent Perl CGI, it just augments HTML with a few new and very useful abilities.
Enhancements:
- A new option was added to enforce Taint mode for unescaped variables.
- Several long-standing bugs were fixed.
- The enhanced tests produced by the Phalanx project are now part of the module.
Download (0.061MB)
Added: 2007-01-31 License: GPL (GNU General Public License) Price:
998 downloads
Pod::Template 0.02
Pod::Template is a Perl module for building pod documentation from templates. more>>
Pod::Template is a Perl module for building pod documentation from templates.
SYNOPSIS
### As a module ###
use Pod::Template;
my $parser = new Pod::Template;
$parser->parse( template => documentation.ptmpl );
print $parser->as_string
### As a script ###
$ podtmpl -I dir1 -I dir2 documentation.ptmpl
### A simple module prepared to use Pod::Template ###
package My::Module;
=Template print_me
=head2 print_me( $string )
Prints out its argument.
=cut
sub print_me { print shift; return 1 }
### A simple pod file named Extra/Additional.pod ###
=pod
=Template return_vals
This subroutine returns 1 for success and undef for failure.
=cut
### A simple Pod::Template template ###
=Include My::Module
=Include Extra/Additional.pod as Extra
=pod
=head1 SYNOPSIS
use My::Module
My::Module::print_me(some text);
=head2 Functions
=Insert My::Module->print_me
=Insert Extra->return_vals
=cut
Writing documentation on a project maintained by several people which spans more than one module is a tricky matter. There are many things to consider:
Location
Should pod be inline (above every function), at the bottom of the module, or in a distinct file? The first is easier for the developers, but the latter two are better for the pod maintainers.
Order
What order should the documentation be in? Does it belong in the order in which the functions are written, or ordered by another principle, such as frequency of use or function type? Again, the first option is better for the developers, while the second two are better for the user.
References
How should a function in another file be mentioned? Should the documentation simply say see Other::Module, or should it include the relevant section? Duplication means that the documentation is more likely to be outdated, but its bad for a user to have to read numerous documents to simply find out what an inherited method does.
Headers & Footers
What should be done with standard headers and footers? Should they be pasted in to every file, or can the main file be assumed to cover the entire project?
Pod::Template offers a solution to these problems: documentation is built up from templates.
<<lessSYNOPSIS
### As a module ###
use Pod::Template;
my $parser = new Pod::Template;
$parser->parse( template => documentation.ptmpl );
print $parser->as_string
### As a script ###
$ podtmpl -I dir1 -I dir2 documentation.ptmpl
### A simple module prepared to use Pod::Template ###
package My::Module;
=Template print_me
=head2 print_me( $string )
Prints out its argument.
=cut
sub print_me { print shift; return 1 }
### A simple pod file named Extra/Additional.pod ###
=pod
=Template return_vals
This subroutine returns 1 for success and undef for failure.
=cut
### A simple Pod::Template template ###
=Include My::Module
=Include Extra/Additional.pod as Extra
=pod
=head1 SYNOPSIS
use My::Module
My::Module::print_me(some text);
=head2 Functions
=Insert My::Module->print_me
=Insert Extra->return_vals
=cut
Writing documentation on a project maintained by several people which spans more than one module is a tricky matter. There are many things to consider:
Location
Should pod be inline (above every function), at the bottom of the module, or in a distinct file? The first is easier for the developers, but the latter two are better for the pod maintainers.
Order
What order should the documentation be in? Does it belong in the order in which the functions are written, or ordered by another principle, such as frequency of use or function type? Again, the first option is better for the developers, while the second two are better for the user.
References
How should a function in another file be mentioned? Should the documentation simply say see Other::Module, or should it include the relevant section? Duplication means that the documentation is more likely to be outdated, but its bad for a user to have to read numerous documents to simply find out what an inherited method does.
Headers & Footers
What should be done with standard headers and footers? Should they be pasted in to every file, or can the main file be assumed to cover the entire project?
Pod::Template offers a solution to these problems: documentation is built up from templates.
Download (0.008MB)
Added: 2006-09-21 License: Perl Artistic License Price:
1128 downloads
HCKit::Template 0.02
HCKit::Template is a Perl module with a template system for HTML construction. more>>
HCKit::Template is a Perl module with a template system for HTML construction.
This module constructs an HTML page from a template. The conversion proceeds with the help of rewrite rules and data sources. Rewrite rules can be specified in the template file itself, or in the Perl script. Data sources can be XML files, or dynamically constructed in the Perl script.
<<lessThis module constructs an HTML page from a template. The conversion proceeds with the help of rewrite rules and data sources. Rewrite rules can be specified in the template file itself, or in the Perl script. Data sources can be XML files, or dynamically constructed in the Perl script.
Download (0.011MB)
Added: 2006-09-20 License: Perl Artistic License Price:
1129 downloads
Template::Magic 1.39
Template::Magic is a Perl module for magic merger of runtime values with templates. more>>
Template::Magic is a Perl module for magic merger of runtime values with templates.
SYNOPSIS
Just add these 2 magic lines to your code...
use Template::Magic;
Template::Magic->new->print( /path/to/template );
to have all your variable and subroutines merged with the template file, or set one or more constructor array to customize the output generation as you need:
use Template::Magic qw( -compile );
$tm = new Template::Magic
paths => [ qw(/any/path /any/other/path) ] ,
markers => [ qw( < / > ) ] ,
lookups => [ %my_hash, $my_obj, main ] ,
zone_handlers => [ &my_zone_handler, _EVAL_ ] ,
value_handlers => [ DEFAULT, &my_value_handler ] ,
text_handlers => sub {print lc $_[1]} ,
output_handlers => sub {print uc $_[1]} ,
post_handlers => &my_post_handler ,
options => no_cache ;
$tm->nprint( template => /path/to/template
lookups => %my_special_hash );
<<lessSYNOPSIS
Just add these 2 magic lines to your code...
use Template::Magic;
Template::Magic->new->print( /path/to/template );
to have all your variable and subroutines merged with the template file, or set one or more constructor array to customize the output generation as you need:
use Template::Magic qw( -compile );
$tm = new Template::Magic
paths => [ qw(/any/path /any/other/path) ] ,
markers => [ qw( < / > ) ] ,
lookups => [ %my_hash, $my_obj, main ] ,
zone_handlers => [ &my_zone_handler, _EVAL_ ] ,
value_handlers => [ DEFAULT, &my_value_handler ] ,
text_handlers => sub {print lc $_[1]} ,
output_handlers => sub {print uc $_[1]} ,
post_handlers => &my_post_handler ,
options => no_cache ;
$tm->nprint( template => /path/to/template
lookups => %my_special_hash );
Download (0.045MB)
Added: 2007-07-11 License: Perl Artistic License Price:
839 downloads
Template::Recall 0.05
Template::Recall is a Reverse callback templating system. more>>
Template::Recall is a "Reverse callback" templating system.
SYNOPSIS
use Template::Recall;
my $tr = Template::Recall->new( template_path => /path/to/template/sections );
my @prods = (
soda,sugary goodness,$.99,
energy drink,jittery goodness,$1.99,
green tea,wholesome goodness,$1.59
);
$tr->render(header);
# Load template into memory
$tr->preload(prodrow);
for (@prods)
{
my %h;
my @a = split(/,/, $_);
$h{product} = $a[0];
$h{description} = $a[1];
$h{price} = $a[2];
print $tr->render(prodrow, %h);
}
# Remove template from memory
$tr->unload(prodrows);
print $tr->render(footer);
Template::Recall works using what I call a "reverse callback" approach. A "callback" templating system (i.e. Mason, Apache::ASP) generally includes template markup and code in the same file. The template "calls" out to the code where needed. Template::Recall works in reverse. Rather than inserting code inside the template, the template remains separate, but broken into sections. The sections are called from within the code at the appropriate times.
<<lessSYNOPSIS
use Template::Recall;
my $tr = Template::Recall->new( template_path => /path/to/template/sections );
my @prods = (
soda,sugary goodness,$.99,
energy drink,jittery goodness,$1.99,
green tea,wholesome goodness,$1.59
);
$tr->render(header);
# Load template into memory
$tr->preload(prodrow);
for (@prods)
{
my %h;
my @a = split(/,/, $_);
$h{product} = $a[0];
$h{description} = $a[1];
$h{price} = $a[2];
print $tr->render(prodrow, %h);
}
# Remove template from memory
$tr->unload(prodrows);
print $tr->render(footer);
Template::Recall works using what I call a "reverse callback" approach. A "callback" templating system (i.e. Mason, Apache::ASP) generally includes template markup and code in the same file. The template "calls" out to the code where needed. Template::Recall works in reverse. Rather than inserting code inside the template, the template remains separate, but broken into sections. The sections are called from within the code at the appropriate times.
Download (0.005MB)
Added: 2007-04-07 License: Perl Artistic License Price:
931 downloads
Template::Plugins 2.19
Template::Plugins is a Perl module with plugin provider module. more>>
Template::Plugins is a Perl module with plugin provider.
SYNOPSIS
use Template::Plugins;
$plugin_provider = Template::Plugins->new(%options);
($plugin, $error) = $plugin_provider->fetch($name, @args);
The Template::Plugins module defines a provider class which can be used to load and instantiate Template Toolkit plugin modules.
<<lessSYNOPSIS
use Template::Plugins;
$plugin_provider = Template::Plugins->new(%options);
($plugin, $error) = $plugin_provider->fetch($name, @args);
The Template::Plugins module defines a provider class which can be used to load and instantiate Template Toolkit plugin modules.
Download (0.76MB)
Added: 2007-08-08 License: Perl Artistic License Price:
807 downloads
Template::Alloy 1.004
Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine. more>>
Template::Alloy is a TT2/3, HT, HTE, Tmpl, and Velocity Engine.
SYNOPSIS
Template::Toolkit style usage
my $t = Template::Alloy->new(
INCLUDE_PATH => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
# print to STDOUT
$t->process(my/template.tt, $swap)
|| die $t->error;
# process into a variable
my $out = ;
$t->process(my/template.tt, $swap, $out);
### Alloy uses the same syntax and configuration as Template::Toolkit
HTML::Template::Expr style usage
my $t = Template::Alloy->new(
filename => my/template.ht,
path => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->param($swap);
# print to STDOUT (errors die)
$t->output(print_to => *STDOUT);
# process into a variable
my $out = $t->output;
### Alloy can also use the same syntax and configuration as HTML::Template
Text::Tmpl style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->set_delimiters(#[, ]#);
$t->set_strip(0);
$t->set_values($swap);
$t->set_dir(/path/to/templates);
my $out = $t->parse_file(my/template.tmpl);
my $str = "Foo #[echo $key1]# Bar";
my $out = $t->parse_string($str);
### Alloy uses the same syntax and configuration as Text::Tmpl
Velocity (VTL) style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
my $out = $t->merge(my/template.vtl, $swap);
my $str = "#set($foo 1 + 3) ($foo) ($bar) ($!baz)";
my $out = $t->merge($str, $swap);
<<lessSYNOPSIS
Template::Toolkit style usage
my $t = Template::Alloy->new(
INCLUDE_PATH => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
# print to STDOUT
$t->process(my/template.tt, $swap)
|| die $t->error;
# process into a variable
my $out = ;
$t->process(my/template.tt, $swap, $out);
### Alloy uses the same syntax and configuration as Template::Toolkit
HTML::Template::Expr style usage
my $t = Template::Alloy->new(
filename => my/template.ht,
path => [/path/to/templates],
);
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->param($swap);
# print to STDOUT (errors die)
$t->output(print_to => *STDOUT);
# process into a variable
my $out = $t->output;
### Alloy can also use the same syntax and configuration as HTML::Template
Text::Tmpl style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
$t->set_delimiters(#[, ]#);
$t->set_strip(0);
$t->set_values($swap);
$t->set_dir(/path/to/templates);
my $out = $t->parse_file(my/template.tmpl);
my $str = "Foo #[echo $key1]# Bar";
my $out = $t->parse_string($str);
### Alloy uses the same syntax and configuration as Text::Tmpl
Velocity (VTL) style usage
my $t = Template::Alloy->new;
my $swap = {
key1 => val1,
key2 => val2,
code => sub { 42 },
hash => {a => b},
};
my $out = $t->merge(my/template.vtl, $swap);
my $str = "#set($foo 1 + 3) ($foo) ($bar) ($!baz)";
my $out = $t->merge($str, $swap);
Download (0.14MB)
Added: 2007-06-28 License: Perl Artistic License Price:
849 downloads
Template::Simple 0.01
Template::Simple is a simple and fast template module. more>>
Template::Simple is a simple and fast template module.
SYNOPSIS
use Template::Simple;
my $tmpl = Template::Simple->new();
my $template = Jan 1, 2008,
author => Me, myself and I,
},
row => [
{
first => row 1 value 1,
second => row 1 value 2,
},
{
first => row 2 value 1,
second => row 2 value 2,
},
],
footer_data => {
modified => Aug 31, 2006,
},
} ;
my $rendered = $tmpl->render( $template, $data ) ;
Template::Simple has these goals:
Support most common template operations
It can recursively include other templates, replace tokens (scalars), recursively render nested chunks of text and render lists. By using simple idioms you can get conditional renderings.
Complete isolation of template from program code
This is very important as template design can be done by different people than the program logic. It is rare that one person is well skilled in both template design and also programming.
Very simple template markup (only 4 markups)
The only markups are INCLUDE, START, END and token. See MARKUP for more.
Easy to follow rendering rules
Rendering of templates and chunks is driven from a data tree. The type of the data element used in an rendering controls how the rendering happens. The data element can be a scalar or scalar reference or an array, hash or code reference.
Efficient template rendering
Rendering is very simple and uses Perls regular expressions efficiently. Because the markup is so simple less processing is needed than many other templaters. Precompiling templates is not supported yet but that optimization is on the TODO list.
Easy user extensions
User code can be called during an rendering so you can do custom renderings and plugins. Closures can be used so the code can have its own private data for use in rendering its template chunk.
<<lessSYNOPSIS
use Template::Simple;
my $tmpl = Template::Simple->new();
my $template = Jan 1, 2008,
author => Me, myself and I,
},
row => [
{
first => row 1 value 1,
second => row 1 value 2,
},
{
first => row 2 value 1,
second => row 2 value 2,
},
],
footer_data => {
modified => Aug 31, 2006,
},
} ;
my $rendered = $tmpl->render( $template, $data ) ;
Template::Simple has these goals:
Support most common template operations
It can recursively include other templates, replace tokens (scalars), recursively render nested chunks of text and render lists. By using simple idioms you can get conditional renderings.
Complete isolation of template from program code
This is very important as template design can be done by different people than the program logic. It is rare that one person is well skilled in both template design and also programming.
Very simple template markup (only 4 markups)
The only markups are INCLUDE, START, END and token. See MARKUP for more.
Easy to follow rendering rules
Rendering of templates and chunks is driven from a data tree. The type of the data element used in an rendering controls how the rendering happens. The data element can be a scalar or scalar reference or an array, hash or code reference.
Efficient template rendering
Rendering is very simple and uses Perls regular expressions efficiently. Because the markup is so simple less processing is needed than many other templaters. Precompiling templates is not supported yet but that optimization is on the TODO list.
Easy user extensions
User code can be called during an rendering so you can do custom renderings and plugins. Closures can be used so the code can have its own private data for use in rendering its template chunk.
Download (0.015MB)
Added: 2006-09-29 License: Perl Artistic License Price:
1121 downloads
MfGames.Template 1.1.0
The MfGames.Template library is a C# native library for creating template libaries. more>>
The MfGames.Template library is a C# native library for creating template libaries.
MfGames.Template was inspired by NVelocity, but was designed from the ground up to use the CIL internals, such as System.CodeDom and internal compliation to handle the template language.
Because of this, it supports C# code as the template "language". In addition, compiled templates are actually compiled down into bytecode, using the built-in compiler.
<<lessMfGames.Template was inspired by NVelocity, but was designed from the ground up to use the CIL internals, such as System.CodeDom and internal compliation to handle the template language.
Because of this, it supports C# code as the template "language". In addition, compiled templates are actually compiled down into bytecode, using the built-in compiler.
Download (0.017MB)
Added: 2006-04-07 License: LGPL (GNU Lesser General Public License) Price:
1295 downloads
Template::TT2Site 0.95
Template::TT2Site is a Perl module to create standard web sites with the Template Toolkit. more>>
Template::TT2Site is a Perl module to create standard web sites with the Template Toolkit.
SYNOPSIS
$ mkdir NewSite
$ cd NewSite
$ tt2site setup
... make your pages ...
$ tt2site build
... point your browser at html/index.html ...
tt2site is just a wrapper program. tt2site setup is equivalent to perl -MTemplate::TT2Site -e setup, and so on.
Template::TT2Site is a framework to create web sites using the Template Toolkit.
The technical structure of the site is patterned after the method described in chapter 11 of The Badger Book. The structure has been slightly simplified for ease of use, and a couple of neat features are added:
The resultant site is position independent, i.e., it only uses relative URLs to the extent possible. This makes it easy to build partial sites, and to relocate the contents.
The necessary means are provided to create multi-language sites, where each page gets a link to its translations.
The site.map hash, required for site navigation, is created automatically using minimal, position independent, directions.
This module, Template::TT2Site, provides the necessary methods to setup and maintain a site. It is used by the wrapper program, tt2site.
<<lessSYNOPSIS
$ mkdir NewSite
$ cd NewSite
$ tt2site setup
... make your pages ...
$ tt2site build
... point your browser at html/index.html ...
tt2site is just a wrapper program. tt2site setup is equivalent to perl -MTemplate::TT2Site -e setup, and so on.
Template::TT2Site is a framework to create web sites using the Template Toolkit.
The technical structure of the site is patterned after the method described in chapter 11 of The Badger Book. The structure has been slightly simplified for ease of use, and a couple of neat features are added:
The resultant site is position independent, i.e., it only uses relative URLs to the extent possible. This makes it easy to build partial sites, and to relocate the contents.
The necessary means are provided to create multi-language sites, where each page gets a link to its translations.
The site.map hash, required for site navigation, is created automatically using minimal, position independent, directions.
This module, Template::TT2Site, provides the necessary methods to setup and maintain a site. It is used by the wrapper program, tt2site.
Download (0.035MB)
Added: 2007-02-22 License: Perl Artistic License Price:
974 downloads
Piffle::Template 0.3.1
Piffle::Template is a Perlish templating language. more>>
Piffle::Template is a Perlish templating language.
SYNOPSIS
use Piffle::Template;
use Piffle::Template qw{template_to_perl expand_template};
# OO syntax, with output stored and returned:
print Piffle::Template->expand(source_file => foo/fish.xml,
include_path => [foo/inc,foo]);
# Immediate: OO syntax: output goes directly to STDOUT:
Piffle::Template->expand(source_file => foo/fish.xml,
output_file => *STDOUT);
# Procedural syntax, data from a string
$string =
< ?perl } ? >
< ?include std_disclaimer.txt? >
__END__
expand_template(source => $string,
output_file => *FILE);
This is a simple Perl-embedding syntax for template code which is geared towards allowing authors to validate their templates directly against schemas or DTDs. The embedded language is Perl itself, which allows great flexibility at the expense of having to be disciplined about the barrier between template code and module code.
In operation, the source template is transformed to an in-memory Perl script which is then run using Perls eval operator. Errors can be redirected to files or subroutines, and the output can be either caught in a variable or written to a file or open filehandle.
<<lessSYNOPSIS
use Piffle::Template;
use Piffle::Template qw{template_to_perl expand_template};
# OO syntax, with output stored and returned:
print Piffle::Template->expand(source_file => foo/fish.xml,
include_path => [foo/inc,foo]);
# Immediate: OO syntax: output goes directly to STDOUT:
Piffle::Template->expand(source_file => foo/fish.xml,
output_file => *STDOUT);
# Procedural syntax, data from a string
$string =
< ?perl } ? >
< ?include std_disclaimer.txt? >
__END__
expand_template(source => $string,
output_file => *FILE);
This is a simple Perl-embedding syntax for template code which is geared towards allowing authors to validate their templates directly against schemas or DTDs. The embedded language is Perl itself, which allows great flexibility at the expense of having to be disciplined about the barrier between template code and module code.
In operation, the source template is transformed to an in-memory Perl script which is then run using Perls eval operator. Errors can be redirected to files or subroutines, and the output can be either caught in a variable or written to a file or open filehandle.
Download (0.009MB)
Added: 2006-09-13 License: Perl Artistic License Price:
1136 downloads
Secleted [ 0 ] software to compare
Copyright Notice:
Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future software development. The above template search only lists software in full, demo and trial versions for free download. Download links are directly from our mirror sites or publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed