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