Changes 13 KB

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