1 Revision history for Text::Template
7 - Improve AppVeyor tests for older Perls (Thanks Roy Ivy)
8 - Check for Test::More 0.94 and skip tests if not installed where
9 done_testing() is used (Thanks Roy Ivy).
10 - Improve workaround for broken Win32 File::Temp taint failure (Thanks Roy Ivy).
11 - Skip/todo tests which fail under Devel::Cover (Thanks Roy Ivy)
12 - Add checks and skip_all checks for non-core test modules (Thanks Roy Ivy)
15 - Fix tempfile creation during tests on Win32
18 - Add support for decoding template files via ENCODING constructor arg
20 - Docs cleanup: replace indirect-object style examples and use class method
21 style constructor calls in the POD docs
22 - Docs cleanup: remove hard tabs from POD, replace dated, unfair synopsis
23 [github #5], convert "THANKS" section to a POD list
26 - Fix possible 'Subroutine ... redefined' warning (Github #10)
29 - Add test for nested tags breakage that happened in v1.46
30 - Turn off strict+warnings in sections where template code is eval'ed
34 *** Revert support for identical start/end delimiters (e.g.: @@foo@@, XXfooXX)
35 due to breakage with nested tags (see
36 https://github.com/mschout/perl-text-template/issues/8). Will revisit
37 this in a future release.
40 - Fix failing tests in v1.48 under perl < 5.8.9
43 - remove COPYING and Artistic files from the dist. These are replaced by
44 the Dist::Zilla generated LICENSE file.
45 - use strict/warnings (thanks Mohammad S Anwar)
46 - remove $VERSION checks from tests. This makes it easier to run the test
47 with Dist::Zilla and avoids maintenance issue of updating the tests for
48 each release (Thanks Andrew Ruder).
49 - Allow precompiled templates to work with preprocessing [#29928] (Thanks
51 - Add "strict" option to fill_in(). This adds "use strict" and "use vars
52 (...)" to the prepend section, and only the keys of the HASH option are
53 allowed in the template. (Thanks Desmond Daignault, Kivanc Yazan, CJM)
55 - Fix templates with inline comments without newline after comment for perl
57 - Don't use bareword file handles
58 - use three arg form of open()
59 - Fix BROKEN behaviour so that it returns the text accumulated so far on
60 undef as documented [28974]
61 - Source code cleanups
62 - Minimum perl version is now 5.8.0
63 - Allow start/end delimiters to be identical (e.g.: @@foo@@, XXfooXX)
64 (Thanks mirod) [46639]
65 - Fix + document the FILENAME parameter to fill_in() (Thanks VDB) [106093]
66 - Test suite cleanups:
67 + turn on strict/warnings for all tests
68 + run tests through perltidy and formatting cleanup
69 + remove number prefixes from test names
70 + use Test::More instead of generating TAP by hand
71 + use three-arg form of open()
72 + don't use indirect object syntax
73 + don't use bareword file handles
74 + use File::Temp to generate temporary files
77 - Fix longstanding memory leak in _scrubpkg() [#22031]
78 - Fix various spelling errors [#86872]
80 NOTE: Changes for versions prior to 1.47 have been imported from README
83 - Thanks to Rik Signes, there is a new
84 Text::Template->append_text_to_output method, which Text::Template always
85 uses whenever it wants to emit output. You can subclass this to get
86 control over the output, for example for postprocessing.
87 - A spurious warning is no longer emitted when the TYPE parameter to ->new
93 - This is a maintenance release. There are no feature changes.
94 - _scrubpkg, which was responsible for eptying out temporary packages after
95 the module had done with them, wasn't always working; the result was
96 memory leaks in long-running applications. This should be fixed now, and
97 there is a test in the test suite for it.
98 - Minor changes to the test suite to prevent spurious errors.
99 - Minor documentation changes.
102 - The ->new method now fails immediately and sets $Text::Template::ERROR if
103 the file that is named by a filename argument does not exist or cannot be
104 opened for some other reason. Formerly, the constructor would succeed
105 and the ->fill_in call would fail.
108 - This is a maintenance release. There are no feature changes.
109 - Fixed a bug relating to use of UNTAINT under perl 5.005_03 and possibly
111 - Taint-related tests are now more comprehensive.
114 - This is a maintenance release. There are no feature changes.
115 - Tests now work correctly on Windows systems and possibly on other
119 *** INCOMPATIBLE CHANGE ***
120 - The format of the default error message has changed. It used to look
123 Program fragment at line 30 delivered error ``Illegal division by zero''
127 Program fragment delivered error ``Illegal division by zero at catalog.tmpl line 37''
129 Note that the default message used to report the line number at which the
130 program fragment began; it now reports the line number at which the error
133 *** INCOMPATIBLE CHANGE ***
134 - The format of the default error message has changed. It used to look like:
136 Program fragment at line 30 delivered error ``Illegal division by zero''
140 Program fragment delivered error ``Illegal division by zero at catalog.tmpl line 37''
142 - Note that the default message used to report the line number at which the
143 program fragment began; it now reports the line number at which the error
145 - New UNTAINT option tells the module that it is safe to 'eval' code even
146 though it has come from a file or filehandle.
147 - Code added to prevent memory leaks when filling many templates. Thanks
148 to Itamar Almeida de Carvalho.
149 - Bug fix: $OUT was not correctly initialized when used in conjunction
151 - You may now use a glob ref when passing a filehandle to the ->new
152 function. Formerly, a glob was required.
153 - New subclass: Text::Template::Preprocess. Just like Text::Template, but
154 you may supply a PREPROCESS option in the constructor or the fill_in
155 call; this is a function which receives each code fragment prior to
156 evaluation, and which may modify and return the fragment; the modified
157 fragment is what is evaluated.
158 - Error messages passed to BROKEN subroutines will now report the correct
159 line number of the template at which the error occurred:
161 Illegal division by zero at template line 37.
163 - If the template comes from a file, the filename will be reported as well:
165 Illegal division by zero at catalog.tmpl line 37.
167 - New UNTAINT option tells the module that it is safe to eval template code
168 even if it has come from a file or filehandle, disabling taint checking
170 - Code added to prevent memory leaks when filling many templates. Thanks to
171 Itamar Almeida de Carvalho.
172 - Bug fix: $OUT was not always correctly initialized when used in
173 conjunction with SAFE.
174 - You may now use a glob ref when passing a filehandle to the new function.
175 Formerly, a glob was required.
176 - Error messages passed to BROKEN subroutines will now report the correct
177 line number of the template at which the error occurred:
179 Illegal division by zero at template line 37.
181 If the template comes from a file, the filename will be reported as well:
183 Illegal division by zero at catalog.tmpl line 37.
185 - New subclass: Text::Template::Preprocess. Just like Text::Template, but
186 you may supply a PREPROCESS option in the fill_in call; this is a
187 function which receives each code fragment prior to evaluation, and which
188 may modify and return the fragment; the modified fragment is what is
192 - Maintenance and bug fix release
193 - fill_in_string was failing. Thanks to Donald L. Greer Jr. for the test case.
196 - Small bug fix: DELIMITER and other arguments were being ignored in calls
197 to fill_in_file and fill_this_in. (Thanks to Jonathan Roy for reporting
201 - You can now specify that certain Perl statements be prepended to the
202 beginning of every program fragment in a template, either per template,
203 or for all templates, or for the duration of only one call to fill_in.
204 This is useful, for example, if you want to enable `strict' checks in
205 your templates but you don't want to manually add `use strict' to the
206 front of every program fragment everywhere.
209 - You can now specify that the program fragment delimiters are strings
210 other than { and }. This has three interesting effects: First, it
211 changes the delimiter strings. Second, it disables the special meaning
212 of \, so you have to be really, really sure that the delimiters will not
213 appear in your templates. And third, because of the simplifications
214 introduced by the elimination of \ processing, template parsing is 20-25%
215 faster. See the manual section on `Alternative Delimiters'.
216 - Fixed bug having to do with undefined values in HASH options. In
217 particular, Text::Template no longer generates a warning if you try to
218 give a variable an undefined value.
221 - I forgot to say that Text::Template ISA Exporter, so the exported
222 functions never got exported. Duhhh!
223 - Template TYPEs are now case-insensitive. The `new' method now diagnoses
224 attempts to use an invalid TYPE.
225 - More tests for these things.
228 - Fixed a bug in the way backslashes were processed. The 1.10 behavior was
229 incompatible with the beta versions and was also inconvenient. (`\n' in
230 templates was replaced with `n' before it was given to Perl for
231 evaluation.) The new behavior is also incompatible with the beta
232 versions, but it is only a little bit incompatible, and it is probably
234 - Documentation for the new behavior, and tests for the bug.
237 - New OUTPUT option delivers template results directly to a filehandle
238 instead of making them into a string. Saves space and time.
239 - PACKAGE and HASH now work intelligently with SAFE.
240 - Fragments may now output data directly to the template, rather than
241 having to arrange to return it as a return value at the end. This means
242 that where you used to have to write this:
245 foreach $i (@items) {
246 $blist .= qq{ * $i\n};
251 You can now write this instead, because $OUT is special.
253 { foreach $i (@items) {
258 (`A spoonful of sugar makes the medicine go down.')
259 - Fixed some small bugs. Worked around a bug in Perl that does the wrong
260 thing with $x = <Y> when $x contains a glob.
261 - More documentation. Errors fixed.
265 - Code added to support HASH option to fill_in. (Incl. `_gensym'
267 - Documentation for HASH.
268 - New test file for HASH.
269 - Note about failure of lexical variables to propagate into templates. Why
270 does this surprise people?
271 - Bug fix: program fragments are evaluated in an environment with `no
272 strict' by default. Otherwise, you get a lot of `Global symbol "$v"
273 requires explicit package name' failures. Why didn't the test program
274 pick this up? Because the only variable the test program ever used was
275 `$a', which is exempt. Duhhhhh.
276 - Fixed the test program.
277 - Various minor documentation fixes.
280 This is a complete rewrite. The new version delivers better functionality
281 but is only 2/3 as long, which I think is a good sign. It is supposed to be
282 100% backward-compatible with the previous versions. With one cosmetic
283 change, it passes the test suite that the previous versions passed. If you
284 have compatibility problems, please mail me immediately.
286 - At least twice as fast
287 - Better support for filling out the same template more than once
288 - Now supports evaluation of program fragments in Safe compartments.
290 - Better argument syntax
291 - More convenience functions
292 - The parser is much better and simpler
293 - Once a template is parsed, the parsed version is stored so that
294 it needn't be parsed again.
295 - BROKEN function behavior is rationalized. You can now pass an
296 arbitrary argument to your BROKEN function, or return a value
297 from it to the main program.
298 - Documentation overhauled.
301 - Maintained by Mark Jason Dominus (MJD)