Text::MacroText::Macro Perl module is a template facility who's focus is on generating code such as c, java or sql. | |
Download |
Text::Macro Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Michael Maraist
- Publisher web site:
- http://search.cpan.org/~maraist/Text-Macro-0.07/Macro.pm
Text::Macro Tags
Text::Macro Description
Text::Macro Perl module is a template facility who's focus is on generating code such as c, java or sql. Text::Macro Perl module is a template facility who's focus is on generating code such as c, java or sql. While generating perl code is also possible, there is a potential conflict between the control-symbol and the perl comment symbol.Perl is excelent at manipulating text, and it begs the question why one would need such a tool.The answer is that good code design should be such that applications should not have to be modified so as to make configuration changes. Thus external configuration files/data is used. However, if these files are read in as perl-code, then simple errors could crash the whole application (or provide subtle security risks). Further, it is often desired to invert the control flow and text-data (namely, make the embedded strings primary, and control-flow secondary). This is the ASP model, and for 90% HTML, 10% code, this works great.This module supports many control facilities which directly translate into perl-control facilities (e.g. inverting the ASP-style code back into perl-style behind the scenes). The inversion process is cached in a simple user object.The module was initially inspired by Text::FastTemplate by Robert Lehr, who's module didn't completely fullfill my needs. Here are some key features of "Text::Macro": · fast, simple, robust · code-generating-centric feature-set · substitutions stand-out from template · macro-code embedded in text · OOP · external and internal includes (for clearifying complex control-flow) · scoped variable-substitutions · line-based processing (like cpp) · usable error messages Requirements: · Perl
Text::Macro Related Software