[Templates] Developer Release 2.06e

Andy Wardley abw@kfs.org
Tue, 12 Mar 2002 17:41:17 +0000


There's a new developer release, 2.06e, available from the web site.  

  http://www.tt2.org/download.html

This will become 2.07 in the next few days.  Any new patches, other
than serious bugfixes, will have to wait for a 2.07a developer release.

Changes below.

Enjoy!
A


#------------------------------------------------------------------------
# Version 2.06e - March 12th 2002                 ## DEVELOPER RELEASE ##
#------------------------------------------------------------------------

* Fixed a minor bug in t/tiedhash.t which was trying to use the XS stash
  even if it wasn't enabled.  Thanks to Lyle Brooks for the patch.

* Added the 'match' virtual method for matching a string against a 
  regex and returning a reference to a list of (captured) (backrefs).

* Changed html filter back into a fast and simple static filter.  Added
  html_entity filter which uses Apache::Util or HTML::Entities to do 
  a complete and thorough (but slower) job.  The undocumented 'entity'
  option of the html filter is now removed (but may appear elsewhere).

* Added the size virtual method for scalars to prove a consistent way
  of testing something.size to see if it has some value(s).  For scalars
  it returns 1.

* Modified the 'sort' and 'nsort' list virtual methods to allow a sort
  key passed to represent a method to be called on objects in the list
  as well as the key of a value to be fetched from hash references in 
  the list.  e.g. [% books.sort('author') %] allows 'books' to contain 
  a list of hash refs with an 'author' key or objects with an 'author'
  method.  Thanks to Tony Bowden for suggesting this improvement.

* Applied a patch from Simon Wilcox to strip MS-DOS \r characters from 
  end of lines read by the Datafile plugin.

* Applied a patch from Ville Skyttä <ville.skytta@iki.fi> which fixes
  numerous minor bugs in various splash templates.

* Added the 'defined' and 'exists' virtual hash methods for testing if
  a value has a defined value, or exists in the hash, respectively.

* Applied a patch from Stathy Touloumis to make the XS Stash thread safe.

* Added the 'grep' virtual list method.

* Applied a patch from Mark Fowler to improve the XML XPath plugin's
  handling of nested elements.

* Fixed handling of prefix support in template() and insert() methods
  of Template::Content.  Any prefix is stripped from the name but passed 
  as the second argument to the provider fetch() method.  e.g.
  [% INCLUDE foo:bar %] calls the foo $provider->fetch('bar', 'foo') and
  [% INCLUDE http://tt2.org/t/templates/hello %] results in a call to
  $provider->fetch('//tt2.org/t/templates/hello', 'http')