[Templates-announce] Template Toolkit v2.02 released.

Andy Wardley abw@cre.canon.co.uk
Fri, 6 Apr 2001 13:43:36 +0100


Version 2.02 is now available from the web site:

   http://www.template-toolkit.org/download.html

I haven't yet uploaded it to CPAN but will do just as soon as Leon
tells me it works OK :-)

Enjoy!
A


Here's the relevant section from the Changes file:

#------------------------------------------------------------------------
# Version 2.02 - 6th April 2001
#------------------------------------------------------------------------

* Updated various components of the Splash! library, cleaned up some
  ugliness (a little) and revised the examples.  Documentation in
  Template::Library::Splash is now hopelessly out of date but examples
  are more comprehensive.  Makefile.PL now prompts user to select a
  colour scheme for creating the documentation and examples.

* Fixed problems with Splash! images displaying the "wrong" colour on
  certain systems.  It appears to be the case that this was automatic
  gamma correction at work, an otherwise very cool feature of PNG
  files.  Alas it broke things here so we've switched to GIF files.
  Also made an improvement to the way of generating and using the
  images.  By using simple transparency and doing away with the
  anti-aliasing it's possible to support any foreground colour for a
  set of images in a background colour.  One set of black images are
  now distributed with TT.  These are blown into many colours during
  installation, implemented by the bin/gifsplash script and defined
  as the 'tt2_splash' Makefile target, run automatically as part of
  'make install'.

* Changed redirect filter factory and the underlying Template::_output
  method to accept a 'binmode' flag.  The bin/gifsplash script sets
  this flag to ensure that the GIFs generated for Splash! are valid on
  Win32 platforms (it's a good job SAM knows what binmode is for... :-)

* Applied a patch from Leon Brocard to add 'recurse' and 'verbose'
  options to the ttree.cfg files generated by Makefile.PL.  Their
  absence was preventing the docs and examples from being built
  (unless, like the stupid author, you already had a default
  ~/.ttreerc which included these flags :-).

* Fixed Makefile.PL to check for File::Spec 0.82, thanks to the efforts
  of Doug Steinwand and Leon who found and fixed the problem with
  'splitdir' otherwise not being available.  Later changed requirement
  from 0.82 to 0.80 because this is the version currently distributed
  with ActivePerl 5.6.0 and it appears to work just fine (saves those
  poor Win32 users from having to install any more modules than
  absolutely necessary)

* Removed test for platform specific error messages from t/xpath.t
  Removed warning from README that this test would fail.  Thanks
  again to Leon for the patch and to <umun@yahoo.com> (no name
  given) for reporting the problem.

* Applied another patch from Leon to fix Template::Base.pm to avoid
  "Use of uninitialized value..." warnings.

* Applied yet more patches from Leon to add "use Template::Plugin" or
  something similar to the File, Directory and View plugins.  'use
  base' doesn't work as advertised (e.g. in ensuring the module is
  loaded) in older versions of Perl.

* Fixed t/leak.t to only run one particular test if Perl version is
  5.6.0 or greater.  Test fails on earlier versions due to destructors
  being called in a different order.

* Updated Makefile.PL to supply a more typical default installation
  directory for Win32 systems - C:/Program File/Template Toolkit 2/.
  This brought to light numerous bugs (following) which were fixed
  with the invaluable help of Simon Matthews and Theakston's Black
  Sheep Ale... :-)

* Pathnames generated in the Makefile.PL for the Makefile are now all
  "double quoted" to protect embedded whitespace, e.g. when building
  docs: ttree -f "C:/Program Files/...")

* Patched Template/Provider.pm in several places to strip out any
  extra ':' characters put in the wrong place of a path.  For example,
  when writing compiled template "C:/foo" to disk with a COMPILE_DIR
  of "C:/bar", the resulting file is now "C:/bar/C/foo" instead of
  the erroneous "C:/bar/C:/foo".

* On Win32 systems, provider prefixes must be more than 1 character in
  length.  This is a compromise for cases where you might want to do
  something like: [% INCLUDE C:/foo/bar %].  Remains unchanged on
  other platforms.

* On Win32 systems the DELIMITER now defaults to a slight variation of
  ':' if not otherwise set.  It now uses /:(?!\/)/ to split on ':'
  where not followed by '/'.  This makes things like INCLUDE_PATH =>
  'C:/here:C:/there' work properly, although setting a more suitable
  DELIMITER for Win32 systems (e.g. ';') is still recommended (we tried
  automatically setting it to ';' on Win32, but that caused more problems
  than it was worth).

* Changed Template::Provider to consider a file starting (\w:)?/ as an
  ABSOLUTE path when running on Win32 (e.g. C:/foo).  On other
  platforms, it remains unchanged, looking only for a leading '/'.
  Also changed ttree to do the same, so that 'ttree -f C:/test.cfg'
  is treated as an absolute path and it doesn't try and prefix it
  with the ttree configuration file directory.  Note that ttree
  does this regardless of OS.

* Fixed stringification problem identified by SAM.  Objects that have
  auto-stringification sometimes didn't get properly stringified at the
  right time.  e.g. [% a = "$an_obj" %].

* Fixed File and Directory plugins to gracefully ignore Perl dying with
  "getpwuid() not supported on this platform" errors on Win32.  The
  'uid' and 'user' attributes of File and Directory plugin objects
  are left undefined.

* Then, hacked t/file.t and t/directry.t test to not be run under
  Win32.  There are a couple of outstanding minor problems with these
  test scripts caused by differences in '/' and '\' as path
  separators.  Need to fix these at some point.

* Makefile.PL now saves configuration options in '.defaults.cfg'
  file, using these values as defaults when run again.

* Removed duplicated $VERSION from DBI plugin.

* Updated documentation to reflect new changes.


-- 
Andy Wardley <abw@kfs.org>   Signature regenerating.  Please remain seated.
     <abw@cre.canon.co.uk>   For a good time: http://www.kfs.org/~abw/