|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| lib/HTML/Template/ | H | 13-May-2013 | - | 3,387 | 2,257 |
| t/ | H | 13-May-2013 | - | 1,705 | 1,323 |
| templates/ | H | 13-May-2013 | - | 770 | 482 |
| templates-Pro/ | H | 13-May-2013 | - | 1,471 | 1,069 |
| .gitignore | H A D | 28-Aug-2010 | 423 | 22 | 21 |
| ARTISTIC | H A D | 02-Dec-2007 | 6 KiB | 132 | 99 |
| Changes | H A D | 13-May-2013 | 10.9 KiB | 327 | 258 |
| FAQ | H A D | 28-Jul-2009 | 1.7 KiB | 61 | 52 |
| LGPL | H A D | 21-Jul-2009 | 25.8 KiB | 505 | 418 |
| MANIFEST | H A D | 13-May-2013 | 5.1 KiB | 227 | 226 |
| META.yml | H A D | 13-May-2013 | 635 | 26 | 25 |
| Makefile.PL | H A D | 29-Feb-2012 | 10 KiB | 384 | 326 |
| Pro.xs | H A D | 13-May-2013 | 20.9 KiB | 680 | 569 |
| README | H A D | 28-Feb-2012 | 3.8 KiB | 110 | 79 |
| README.ru | H A D | 07-May-2007 | 847 | | |
| README.win32 | H A D | 22-Nov-2009 | 3.5 KiB | 89 | 74 |
| TODO | H A D | 23-Nov-2009 | 1.9 KiB | 60 | 47 |
| benchmark.pl.t | H A D | 02-Dec-2007 | 3.7 KiB | 113 | 98 |
| builtin_findfile.inc | H A D | 28-Aug-2010 | 13.1 KiB | 376 | 340 |
| calc.h | H A D | 25-Jun-2010 | 672 | 30 | 16 |
| calc.inc | H A D | 26-Mar-2010 | 3.3 KiB | 122 | 105 |
| callback_stubs.inc | H A D | 29-Aug-2010 | 2.1 KiB | 64 | 52 |
| cmp_expr.t | H A D | 02-Dec-2007 | 809 | 33 | 27 |
| expr.c | H A D | 28-Sep-2010 | 71.3 KiB | 2,397 | 1,689 |
| expr.y | H A D | 17-Jun-2010 | 16.9 KiB | 506 | 410 |
| expr_iface.c | H A D | 03-Sep-2009 | 1.8 KiB | 95 | 77 |
| exprpstr.h | H A D | 17-Jun-2010 | 763 | 37 | 24 |
| exprpstr.inc | H A D | 28-Sep-2010 | 4.5 KiB | 169 | 157 |
| exprtool.h | H A D | 17-Jun-2010 | 3.8 KiB | 105 | 71 |
| exprtool.inc | H A D | 13-Oct-2009 | 8.4 KiB | 290 | 269 |
| exprtype.h | H A D | 02-Sep-2009 | 1.3 KiB | 63 | 37 |
| exprval.h | H A D | 04-Sep-2009 | 471 | 31 | 14 |
| loadfile.h | H A D | 07-May-2007 | 225 | 12 | 2 |
| loadfile.inc | H A D | 25-Aug-2010 | 4.8 KiB | 172 | 144 |
| loopvar.inc | H A D | 14-Sep-2009 | 3.3 KiB | 114 | 106 |
| optint.c | H A D | 15-Nov-2009 | 31.1 KiB | 1,779 | 1,755 |
| optint.h | H A D | 15-Nov-2009 | 159 | 9 | 2 |
| pabidecl.h | H A D | 09-Aug-2009 | 1.4 KiB | 55 | 35 |
| pabstract.h | H A D | 21-Sep-2009 | 18.2 KiB | 422 | 35 |
| parse_expr.h | H A D | 05-Aug-2009 | 301 | 16 | 6 |
| pbuffer.c | H A D | 14-Sep-2009 | 1.8 KiB | 77 | 66 |
| pbuffer.h | H A D | 14-Sep-2009 | 798 | 32 | 20 |
| pconst.h | H A D | 28-Aug-2010 | 312 | 19 | 8 |
| perl-HTML-Template-Pro.spec | H A D | 13-May-2013 | 7.7 KiB | 272 | 182 |
| pmiscdef.h | H A D | 24-Sep-2009 | 1.6 KiB | 73 | 39 |
| pparam.h | H A D | 13-May-2013 | 3.7 KiB | 123 | 72 |
| pparam2proparam | H A D | 22-Nov-2009 | 7.8 KiB | 274 | 210 |
| ppport.h | H A D | 20-Aug-2009 | 29.1 KiB | 1,099 | 727 |
| procore.c | H A D | 28-Aug-2010 | 21.9 KiB | 737 | 618 |
| procore.h | H A D | 29-Aug-2010 | 528 | 27 | 17 |
| proparam.c | H A D | 17-Feb-2010 | 10.9 KiB | 456 | 379 |
| proparam.h | H A D | 17-Feb-2010 | 25.9 KiB | 591 | 78 |
| proscope.h | H A D | 01-Sep-2009 | 773 | 33 | 18 |
| proscope.inc | H A D | 14-Sep-2009 | 2.8 KiB | 111 | 98 |
| prostate.h | H A D | 20-Sep-2009 | 886 | 47 | 27 |
| prostate.inc | H A D | 24-Feb-2012 | 775 | 28 | 25 |
| provalue.h | H A D | 04-Aug-2009 | 224 | 15 | 5 |
| pstring.h | H A D | 08-Sep-2009 | 1.5 KiB | 61 | 11 |
| pstrutils.h | H A D | 27-Aug-2009 | 473 | 26 | 10 |
| pstrutils.inc | H A D | 26-Dec-2011 | 5.5 KiB | 191 | 180 |
| tags.inc | H A D | 24-Feb-2012 | 16.8 KiB | 520 | 488 |
| tagstack.h | H A D | 24-Feb-2012 | 794 | 33 | 23 |
| tagstack.inc | H A D | 24-Feb-2012 | 1.6 KiB | 69 | 59 |
| test_crlf.out | H A D | 07-May-2007 | 47 | 5 | 3 |
| tmpllog.c | H A D | 17-Feb-2010 | 1.2 KiB | 71 | 51 |
| tmpllog.h | H A D | 17-Feb-2010 | 941 | 32 | 16 |
| tmplpro.h | H A D | 17-Feb-2010 | 9.2 KiB | 274 | 48 |
| tmplpro_version.c | H A D | 28-Sep-2010 | 899 | 40 | 15 |
README
1HTML-Template-Pro version 0.9509
2==============================
3
4DESCRIPTION
5
6Original HTML::Template is written by Sam Tregar, sam@tregar.com
7with contributions of many people mentioned there.
8Their efforts caused HTML::Template to be mature html tempate engine
9which separate perl code and html design.
10Yet powerful, HTML::Template is slow, especially if mod_perl isn't
11available or in case of disk usage and memory limitations.
12
13HTML::Template::Pro is a fast lightweight C/Perl+XS reimplementation
14of HTML::Template (as of 2.9) and HTML::Template::Expr (as of 0.0.7).
15It is not intended to be a complete replacement,
16but to be a fast implementation of HTML::Template if you don't need
17quering, the extended facility of HTML::Template.
18Designed for heavy upload, resource limitations, abcence of mod_perl.
19
20HTML::Template::Pro has complete support of filters and HTML::Template::Expr's
21tag EXPR="<expression>", including user-defined functions.
22
23HTML::Template work cycle uses 2 steps. First, it loads and parse template.
24Then it accepts param() calls until you call output().
25output() is its second phase where it produces a page from the parsed tree
26of template, obtained in the 1st step.
27
28HTML::Template::Pro loads, parse and outputs template on fly,
29when you call $tmpl->output(), in one pass. The corresponding code is
30written in C and glued to Perl using Perl+XS. As a result,
31when compared to HTML::Template in ordinary calls, it runs
3210-25 times faster. Comparing to HTML::Template with all caching enabled
33under mod_perl, it still 1-3 times faster. At that HTML::Template caching
34requires considerable amount of memory (per process, shareable, or on disk)
35to be permanently filled with parsed trees, whereas HTML::Template::Pro
36doesn't consume memory for caches and use mmap() for reading templates on disk.
37
38INSTALLATION
39
40This module is tested on Linux and FreeBSD. There are success reports
41on MacOS X, Solaris, Windows. Windows users should look at README.win32.
42For Unixes it currently use POSIX mmap() system call,
43which may be unavaliable on some systems.
44In such case add argument MMAP=0 to perl Makefile.PL.
45
46To install this module type the following:
47
48 perl Makefile.PL
49 make
50 make test
51 make install
52
53If you have libpcre installed try
54 perl Makefile.PL PCRE=1
55
56other optional parameters include DEBUG (build with extra debug level)
57and IMITATE (imitate behavior of HTML::Template in all circumstances,
58even on broken templates, for a little cost of perfomance).
59
60So a fully fledged build is
61 perl Makefile.PL PCRE=1 DEBUG=1 IMITATE=1
62
63DEPENDENCIES
64
65This module requires these other modules and libraries:
66
67modules:
68 File::Spec
69
70libraries:
71 libpcre (optional)
72
73TODO
74
75Add support for die_on_bad_params => 1.
76Add support for quering.
77Improve debug message subsystem.
78
79WEBSITE
80
81You can find information about HTML::Template::Pro at:
82
83 http://html-tmpl-pro.sourceforge.net
84 and
85 http://sourceforge.net/projects/html-tmpl-pro
86
87Original HTML::Template and other related modules are located at:
88
89 http://html-template.sourceforge.net
90
91
92COPYRIGHT AND LICENCE
93
94Copyright (C) 2005-2009 by I. Yu. Vlasenko.
95Pieces of code in Pro.pm and documentation of HTML::Template are
96copyright (C) 2000-2009 Sam Tregar (sam@tregar.com)
97Other contributors to the code base are listed in Changes.
98
99The template syntax, interface conventions and a large piece of documentation
100of HTML::Template::Pro are based on CPAN module HTML::Template
101by Sam Tregar, sam@tregar.com.
102
103This library is free software; you can redistribute it and/or modify
104it under the same terms as Perl itself, either Perl version 5.8.4 or,
105at your option, any later version of Perl 5 you may have available,
106or, at your option, under the terms of the GNU Lesser General Public License
107as published by the Free Software Foundation; either version 2 of the
108License, or (at your option) any later version.
109
110
README.win32
1Compiling and using either perl module HTML::Template::Pro or
2C library backend htmltmplpro.dll under win32/win64.
3----------------------------------------------------------
4Note that issues related to other languages' bindings
5are discussed in corresponding bindings.
6
7Release 0.82 and later have full native support for win32
8and win64. The source of HTML-Template-Pro should be ANSI C portable,
9except unix/win specific sections of file loadfile.inc.
10Those sections can be enabled with MMAP=1 or disabled with MMAP=0.
11If MMAP=0 (--without-mmap) slow ANSI C buffered read will be used instead.
12
13There is ifdef-ed section of win32/win64-specific code, with code fixes
14and improved section of WIN32 code of Viacheslav Sheveliov.
15Also, it is known to build successfully on WIN64, thanks to
16Robert Henniger.
17
18Windows memory mapping code use MapViewOfFile/UnmapViewOfFile WIN32 system calls.
19It was disabled by default, because it might not be compatible with
20original HTML-Template when dealing with CRLF-ed templates
21(It opens them in binary mode instead of text one).
22[UPD: I think there should be no difference, at least for C library.
23Windows users, please, test and enlighten me!]
24Nevertheless, compiling with MMAP=1 (--with-mmap, -DUSE_MMAP) should
25improve perfomance and/or memory consumption.
26
27Latest releases of htmltmplpro, built with mingw32 for win32 are
28avaliable on sourceforge and in sisyphus.ru: see
29http://www.sisyphus.ru/en/srpm/Sisyphus/mingw32-htmltmplpro
30http://www.sisyphus.ru/en/srpm/Sisyphus/mingw32-pcre
31
32If you want to compile htmltmplpro from sources and you do want to use
33regexps in EXPR="..." you need an optional PCRE library.
34
35Optional PCRE library for win32 can be obtained either from Sisyphus,
36http://www.sisyphus.ru/en/srpm/Sisyphus/mingw32-pcre
37or from http://gnuwin32.sourceforge.net/packages/pcre.htm (seems to be too old)
38Unpack it into pcre subdirectory.
39
40Perl module should be built using Makefile.PL.
41It is known to compile and work properly under Strawberry Perl.
42
43The C library can be built for Windows using CMake
44http://www.cmake.org/cmake/resources/software.html
45which has a GUI interface and can generate projects for
46# Visual Studio 6
47# Visual Studio 7
48# Visual Studio 7 .NET 2003
49# Visual Studio 8 2005
50# Visual Studio 8 2005 Win64
51# Visual Studio 9 2008
52# Visual Studio 9 2008 Win64
53# Watcom WMake
54# CodeBlocks - MinGW Makefiles
55# Eclipse CDT4 - MinGW Makefiles
56# Eclipse CDT4 - NMake Makefiles
57# Eclipse CDT4 - Unix Makefiles
58# Borland Makefiles
59# MSYS Makefiles
60# MinGW Makefiles
61# NMake Makefiles
62
63Also autotools-based minGW cross-compilation from linux to win32
64is also known to work. Maybe autotools-based cygwin and minGW 64
65compilation will work too, please, report your success.
66
67Example CMake usage.
68
69Unpack source tree. Run CMakeSetup.exe, set up path to the source tree,
70set up path to the build tree to the same value.
71press configure button, choose, for example,
72Visual Studio 9 2008. verify red-labelled configuration
73options. Change, for example, CMAKE_INSTALL_PREFIX.
74press configure button again, press generate button.
75Then open generated config in Visual Studio 9 2008
76and compile it.
77
78If you want to use another build system,
79be sure to define properly int64_type, used in EXPR internally.
80for list of possible defines consult CMakeLists.txt and configure.ac/config.h.in
81in the library source distribution.
82
83If you will try to complie this code on a win system,
84and will get a trouble, be so kind to send me a bugreport
85including logs of failed build.
86Note that I often have no place to test win32/win64 code,
87so patches are always welcome.
88
89