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