fast template
Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 3122
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
Blitz templates 0.5.1
Blitz templates is a fast template engine written in C and compiled as a PHP module. more>>
Blitz templates is a fast template engine written in C and compiled as a PHP module. It started as a php_templates replacement, but developed into much more.
The project is based on extensible template controllers (custom view classes in PHP) and weakly-active templates (simple logic in HTML).
Enhancements:
- Lot of code cleanup was done.
- The "parse" and "include" methods were improved, and their "vars" argument is not a globals array anymore; now its just an arbitrary iteration set and both methods comply with set/block/fetch.
- Templates included by the "include" method from PHP code inherit globals from the caller automatically.
- Corresponding tests were updated.
- A new article was added to the documentation: "Quick Geek Blitz Tutorial", which is addressed to those professionals who want to learn API basics in a minimum of time.
<<lessThe project is based on extensible template controllers (custom view classes in PHP) and weakly-active templates (simple logic in HTML).
Enhancements:
- Lot of code cleanup was done.
- The "parse" and "include" methods were improved, and their "vars" argument is not a globals array anymore; now its just an arbitrary iteration set and both methods comply with set/block/fetch.
- Templates included by the "include" method from PHP code inherit globals from the caller automatically.
- Corresponding tests were updated.
- A new article was added to the documentation: "Quick Geek Blitz Tutorial", which is addressed to those professionals who want to learn API basics in a minimum of time.
Download (0.10MB)
Added: 2007-08-14 License: BSD License Price:
803 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
MAT Template Library 0.1.7
MAT is a C++ mathematical template class library. more>>
MAT Template Library is a C++ mathematical template class library. The library contains classes and routines for working with:
matrices
vectors
finding roots of polynomials
solving equations
and more...
<<lessmatrices
vectors
finding roots of polynomials
solving equations
and more...
Download (0.068MB)
Added: 2006-09-28 License: MIT/X Consortium License Price:
1122 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
kmail templates 20061018
kmail templates is a patch for current 3.5 branch of kdepim package. more>>
kmail templates is a patch for current 3.5 branch of kdepim package which replaces Phrases configuration with more rich templates engine.
Templates use template syntax of well-known Thebat! mail client and allow construct a little more complicated messages than now.
<<lessTemplates use template syntax of well-known Thebat! mail client and allow construct a little more complicated messages than now.
Download (MB)
Added: 2006-10-19 License: GPL (GNU General Public License) Price:
1112 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::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::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
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
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
HTML::CMTemplate 0.4.0
HTML::CMTemplate.pm is a Perl module that can generate text-based content from templates. more>>
HTML::CMTemplate.pm is a Perl module that can generate text-based content from templates.
SYNOPSIS
use HTML::CMTemplate;
$t = new HTML::CMTemplate( path => [ /path1, /longer/path2 ] );
$t->import_template(
filename => file.html.ctpl, # in the paths above
packagename => theTemplate,
importrefs => { myvar => hello },
importclean => { myclean => clean! },
);
theTemplate::cleanup_namespace();
print "Content-type: text/htmlnn";
print theTemplate::output();
# Template syntax is described below -- see that section to get the real
# details on how to use this sucker.
HTML::CMTemplate 0.4.0
A class for generating text-based content from a simple template language. It was inspired by the (as far as Im concerned, incomplete) HTML::Template module, and was designed to make template output extremely fast by converting a text/html template into a dynamic perl module and then running code from that module. Since the parsing happens only once and the template is converted into Perl code, the output of the template is very fast.
It was designed to work with mod_perl and FastCGI and has been the basis for all of the dynamic content on the Orangatango site (http://www.orangatango.com).
First release (version 0.1) was February 15, 2001 and was very quiet because it was a proprietary version.
As of version 0.2, it is released under the Artistic License. Its a much more feature-rich version as well as being Open Source! For a copy of the Artistic License, see the files that came with your Perl distribution.
The code was developed during my time at Orangatango. It has been released as open source with the blessing of the controlling entities there.
<<lessSYNOPSIS
use HTML::CMTemplate;
$t = new HTML::CMTemplate( path => [ /path1, /longer/path2 ] );
$t->import_template(
filename => file.html.ctpl, # in the paths above
packagename => theTemplate,
importrefs => { myvar => hello },
importclean => { myclean => clean! },
);
theTemplate::cleanup_namespace();
print "Content-type: text/htmlnn";
print theTemplate::output();
# Template syntax is described below -- see that section to get the real
# details on how to use this sucker.
HTML::CMTemplate 0.4.0
A class for generating text-based content from a simple template language. It was inspired by the (as far as Im concerned, incomplete) HTML::Template module, and was designed to make template output extremely fast by converting a text/html template into a dynamic perl module and then running code from that module. Since the parsing happens only once and the template is converted into Perl code, the output of the template is very fast.
It was designed to work with mod_perl and FastCGI and has been the basis for all of the dynamic content on the Orangatango site (http://www.orangatango.com).
First release (version 0.1) was February 15, 2001 and was very quiet because it was a proprietary version.
As of version 0.2, it is released under the Artistic License. Its a much more feature-rich version as well as being Open Source! For a copy of the Artistic License, see the files that came with your Perl distribution.
The code was developed during my time at Orangatango. It has been released as open source with the blessing of the controlling entities there.
Download (0.064MB)
Added: 2007-07-14 License: Perl Artistic License Price:
832 downloads
TemplatePower 3.0.2
TemplatePower provides a fast, easy to use and powerful PHP4 template class. more>>
TemplatePower provides a fast, easy to use and powerful PHP4 template class.
TemplatePower is a lot faster than FastTemplate. Main features are: nested dynamic block support, block/file include support, show/hide unassigned variables, save/use parsed template on/from disk, PHP-file include tag, global/local variable assign, multiple variable assign using an associative array, database/php-variable stored template support and a re-use tag for blocks (test state).
<<lessTemplatePower is a lot faster than FastTemplate. Main features are: nested dynamic block support, block/file include support, show/hide unassigned variables, save/use parsed template on/from disk, PHP-file include tag, global/local variable assign, multiple variable assign using an associative array, database/php-variable stored template support and a re-use tag for blocks (test state).
Download (0.012MB)
Added: 2007-04-18 License: GPL (GNU General Public License) Price:
921 downloads
HTML::Template::JIT 0.05
HTML::Template::JIT is a just-in-time compiler for HTML::Template. more>>
HTML::Template::JIT is a just-in-time compiler for HTML::Template. Templates are compiled into native machine code using Inline::C.
When using HTML::Template::JIT, the compiled code is stored to disk and reused on subsequent calls. HTML::Template::JIT is up to 8 times as fast as HTML::Template using caching.
Enhancements:
- Fixed param() to allow for blessed hash-refs. [Alex Kapranoff]
- Fixed url-escaping to work with UTF-8 characters. [Alex Kapranoff]
- Added support for JS escaping. [Alex Kapranoff]
- Fixed a compatibility problem with HTML::Template v2.8, which is now a prerequisite.
<<lessWhen using HTML::Template::JIT, the compiled code is stored to disk and reused on subsequent calls. HTML::Template::JIT is up to 8 times as fast as HTML::Template using caching.
Enhancements:
- Fixed param() to allow for blessed hash-refs. [Alex Kapranoff]
- Fixed url-escaping to work with UTF-8 characters. [Alex Kapranoff]
- Added support for JS escaping. [Alex Kapranoff]
- Fixed a compatibility problem with HTML::Template v2.8, which is now a prerequisite.
Download (0.030MB)
Added: 2005-12-27 License: GPL (GNU General Public License) Price:
1398 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
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 fast 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