Skip to content

Commit

Permalink
prep 2.4d
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.tt2.org/tt/Template2/trunk@157 d5a88997-0a34-4036-9ed2-92fb5d660d91
  • Loading branch information
abw committed Aug 21, 2001
1 parent 9be7d64 commit d941238
Show file tree
Hide file tree
Showing 112 changed files with 315 additions and 383 deletions.
9 changes: 8 additions & 1 deletion Changes
Expand Up @@ -17,13 +17,20 @@
#========================================================================

#------------------------------------------------------------------------
# Version 2.04d - 15 Aug 2001 ## DEVELOPER RELEASE ##
# Version 2.04d - 29 Aug 2001 ## DEVELOPER RELEASE ##
#------------------------------------------------------------------------

* Incorporated Doug Steinwand's XS Stash. This adds the files in the
'xs' directory, t/stash-xs.t, bin/tt-bench.pl and includes some work
on the Makefile.PL to incorporate the required prompting, etc.

* Added gt, ge, lt and le as comparison operators which map directly
to their Perl counterparts. Added tests to t/stash.t and relevant
documentation to the IF directive.

* Applied some patches from Leon and Doug to enhance the coverage of
the test suite.

* Added 'sorted' as a flag to the HTML plugin to return attributes in
sorted order. Mainly for debugging purposes, as used in t/html.t.

Expand Down
1 change: 1 addition & 0 deletions MANIFEST
Expand Up @@ -92,6 +92,7 @@ docs/src/Modules/Template/Provider.html
docs/src/Modules/Template/Service.html
docs/src/Modules/Template/Stash.html
docs/src/Modules/Template/Stash/Context.html
docs/src/Modules/Template/Stash/XS.html
docs/src/Modules/Template/Test.html
docs/src/Modules/index.html
docs/src/Release/Changes.html
Expand Down
14 changes: 6 additions & 8 deletions Makefile.PL
Expand Up @@ -238,7 +238,6 @@ my %opts = (
'dist' => {
'COMPRESS' => 'gzip',
'SUFFIX' => 'gz',
# 'PREOP' => build_docs(),
},
);

Expand Down Expand Up @@ -463,11 +462,9 @@ EOF
$TT_XS_DEFAULT = (ttprompt('Do you want to use the XS Stash for all Templates?',
$TT_XS_DEFAULT) =~ /^y/i);

if ($TT_XS_DEFAULT) {
fix_file('lib/Template/Config.pm',
'$STASH',
'Template::Stash::XS');
}
fix_file('lib/Template/Config.pm',
'$STASH',
$TT_XS_DEFAULT ? 'Template::Stash::XS' : 'Template::Stash');
}
}

Expand Down Expand Up @@ -528,7 +525,7 @@ EOF
#
$TT_PDFLATEX_PATH = $TT_LATEX_PATH = $TT_DVIPS_PATH = "";
}

fix_file('lib/Template/Config.pm', '$PDFLATEX_PATH', $TT_PDFLATEX_PATH);
fix_file('lib/Template/Config.pm', '$LATEX_PATH', $TT_LATEX_PATH);
fix_file('lib/Template/Config.pm', '$DVIPS_PATH', $TT_DVIPS_PATH);
Expand Down Expand Up @@ -644,6 +641,7 @@ EOF

$TT_IMAGES = ttprompt('URL base for TT2 images?', $TT_IMAGES || $IMAGES);
$TT_IMAGES =~ s[/$][]g; # just in case

fix_file('templates/splash/config', 'images', "$TT_IMAGES/splash");
}

Expand Down Expand Up @@ -1047,7 +1045,7 @@ EOF
# fix_file($file, $find, $fix)
#
# Fixes a variable definition in a file. e.g.
# fix_file('lib/Template/Config.pm', '$INSTDIR', '/usr/local/tt2')
# fix_file('templates/splash/config', 'images', '/tt2/splash')
#------------------------------------------------------------------------

sub fix_file {
Expand Down
103 changes: 30 additions & 73 deletions README
Expand Up @@ -95,87 +95,31 @@ appropriate sex, then you can always return it for a full refund. :-)
WHAT'S NEW?
-----------

Version 2.04 is mainly a bug fixing version.
The most exciting new feature in version 2.05 is Doug Steinwand's
high-speed drop-in replacement for Template::Stash written in
Perl XS. With this in place, the Template Toolkit typically runs
twice as fast as before!

Version 2.03 includes Craig Barratt's 'latex' filter and GD plugins.
The latex filter allow you to create PostScript/PDF/DVI output from
LaTeX source templates. The GD plugins allow you to access the GD::*
modules to create dynamic images using template.
Pretty much everything else in 2.05 and 2.04 before it consisted
of minor bug fixes and improvements.

There have been some improvements to VIEWs and they now work
harmoniously with the XML::XPath and XML::DOM plugins for doing
template based transformations of XML to other formats. The HTML
plugin is new (but currently very basic) and some of the Splash! and
HTML library templates have been updated and some new components added.
Version 2.03 includes Craig Barratt's 'latex' filter and GD plugins
and Dave Cross's tutorial on using the Template Toolkit for creating
and reusing XML data files.

There's a new tutorial from Dave Cross on using the Template Toolkit for
creating and reusing data files. There's various other updates to the
documentation, numerous minor bug fixes and other general improvements.
Version 2.02 was another bugfix release, following shortly on after
version 2.01. This was a major release which contained some of
the following:

Version 2.02 followed shortly on the heels of version 2.01, fixing up
some of the minor installation bugs and other problems that came to
light. Here's a quick summary of what's new since version 2.00.
See the Changes file for more details.
* total overhaul of the documtation

Documentation
* additional of template libraries: POD, HTML, Splash!

* Total overhaul of the documentation: existing content reorganised
into several different sections, documentation added for new
features, a FAQ and also a section on internals. Now also
available in user-customisable HTML format, in addition to POD.
* various new language features including VIEWs

Libraries
* new filters and plugins

* The Template Toolkit now includes template libraries for
generating HTML, PostScript and converting POD to HTML (and other
formats). The Splash! library is a powerful HTML widget set for
generating stylish user interfaces. Includes components for
elements like tables, menu buttons, panels with borders and
header/footer bars, edged boxes with index tabs, etc.

Language

* Multiple templates can be specified to directives using '+'

[% PROCESS header + menu + body + footer
title = "Hello World"
%]

* Template variables for INCLUDE, etc., can now be full expressions.

[% INCLUDE header
title = my_title or your_title or default_title
bgcol = (style == 'dark' ? '#000000' : '#ffffff')
%]

* Namespace prefixes can be used to bind templates to a particular
provider.

[% INCLUDE file:header + database:header %]
[% INCLUDE http://foo.com/bar %] # alas no 'http' provider...yet

* Powerful new (but experimental) VIEW directive and/or plugin to
provide dynamic view objects. These can be used to implement
"skins" and other general purpose objects to manage user interface
elements and present views of user data. See Template::Manual::Views
manpage for further details.

* Various other language enhancements: CHOMP_COLLAPSE option,
'import=myhash' as magical variable for INCLUDE, etc.

* New filters: indent, trim and collapse

* New plugins: File and Directory plugins for file/directory
information. Pod plugin interfaces to Pod::POM for converting
Pod to other formats (e.g. HTML).

Internals

* Template::Plugin base class no longer implements AUTOLOAD method.

* Numerous bugs fixed including some troublesome memory leaks.

* Various other minor internal improvements.
For more information please consult the Changes file.


GENERAL FEATURES
Expand Down Expand Up @@ -358,6 +302,19 @@ the relevant database. Please ensure that your database server is
running and that the database you specify exists before executing
'make test' (otherwise, expect a failure for the t/dbi.t test).

The Template Toolkit now boast a high-speed implementation of
Template::Stash written in XS. You can choose to build this as
an optional module for using explicitly as an alternative to
the regular pure-perl stash module. In additional, you can opt
to use the XS Stash as the default, typically making the Template
Toolkit run twice as fast!

When prompted, answer 'y' or 'n' to build and optionally use
the XS Stash module by default:

Do you want to build the XS Stash module? [y]
Do you want to use the XS Stash for all Templates? [n]

The latex filter, new to release 2.03, allows you to generate
PostScript, PDF and DVI files directly from LaTeX source templates.
It relies on 3 external programs which the Makefile.PL script
Expand Down
17 changes: 3 additions & 14 deletions TODO
Expand Up @@ -169,7 +169,9 @@

* Stas Bekman raised the issue of the Stash not being able to correctly
differentiate between scalar/list context and in particular, the
cgi.param examples not working as expected.
cgi.param examples not working as expected. This is fixed in v3 and
in Craig's Stash/Context.pm which does the right lookahead to allow
'scalar' and 'list' postfix operators. e.g. cgi.param.list

* Richard Tietjen's patch for stash replace. Allows back references
(e.g. $1) but it would be nice to find a rock-solid way to implement
Expand All @@ -178,19 +180,6 @@
* Have stash, etc., add current template name/line when reporting errors.
(may be tricky under the current implementation)

* I've written a version of Template::Stash in XS which should give a
significant speedup to the runtime processing. It's 95% complete
(but hasn't been updated to keep up with more recent changes to the
stash) and just needs some minor debugging and testing. The new
Template::Stash will automatically load the existing Perl version if
you don't have a C compiler on your platform (shame on you!).

* And I'm now working on Yet Another Brand New Stash which should
implement all the functionality of Craig's latest patches, rationalise
all sorts of stuff, improve debugging, *AND* run slightly faster.
Furthermore, the new architecture should be much easier to extend
and implement in XS. Watch the mailing list for further details.


#------------------------------------------------------------------------
# Parser
Expand Down
2 changes: 1 addition & 1 deletion bin/tpage
Expand Up @@ -112,7 +112,7 @@ L<http://www.andywardley.com/|http://www.andywardley.com/>
=head1 VERSION
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
=head1 COPYRIGHT
Expand Down
2 changes: 1 addition & 1 deletion bin/ttree
Expand Up @@ -627,7 +627,7 @@ L<http://www.andywardley.com/|http://www.andywardley.com/>
=head1 VERSION
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
=head1 COPYRIGHT
Expand Down
16 changes: 15 additions & 1 deletion docs/lib/docset/config
Expand Up @@ -424,6 +424,18 @@ docset => {
author => 'abw',
about => 'Experimetal stash allowing list/scalar context definition',
prev => 'Stash',
next => 'Stash_XS',
},
Stash_XS => {
id => 'Stash_XS',
name => 'Template::Stash::XS',
title => 'Template::Stash::XS',
podname => 'Template::Stash::XS',
url => 'Modules/Template/Stash/XS.html',
uplink => '../../..',
author => 'abw',
about => 'Experimetal high-speed stash written in XS',
prev => 'Stash_Context',
next => 'Test',
},
Test => {
Expand All @@ -435,7 +447,7 @@ docset => {
uplink => '../..',
author => 'abw',
about => 'Module for automating TT2 test scripts',
prev => 'Stash_Context',
prev => 'Stash_XS',
next => 'Plugin_Autoformat',
},
Plugin_Autoformat => {
Expand Down Expand Up @@ -898,6 +910,7 @@ docset => {
'Service',
'Stash',
'Stash_Context',
'Stash_XS',
'Test',
'Plugin_Autoformat',
'Plugin_CGI',
Expand Down Expand Up @@ -1196,6 +1209,7 @@ docset => {
'Template::Service' => 'Modules/Template/Service.html',
'Template::Stash' => 'Modules/Template/Stash.html',
'Template::Stash::Context' => 'Modules/Template/Stash/Context.html',
'Template::Stash::XS' => 'Modules/Template/Stash/XS.html',
'Template::Test' => 'Modules/Template/Test.html',
'Template::Plugin::Autoformat' => 'Modules/Template/Plugin/Autoformat.html',
'Template::Plugin::CGI' => 'Modules/Template/Plugin/CGI.html',
Expand Down
2 changes: 1 addition & 1 deletion docs/src/FAQ/FAQ.html
Expand Up @@ -207,7 +207,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Library/HTML.html
Expand Up @@ -307,7 +307,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Library/PostScript.html
Expand Up @@ -39,7 +39,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Library/Splash.html
Expand Up @@ -980,7 +980,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.18, distributed as part of the
2.19, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Base.html
Expand Up @@ -98,7 +98,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.21, distributed as part of the
2.22, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Config.html
Expand Up @@ -137,7 +137,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.19, distributed as part of the
2.21, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Constants.html
Expand Up @@ -89,7 +89,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.20, distributed as part of the
2.21, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Context.html
Expand Up @@ -612,7 +612,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.26, distributed as part of the
2.27, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Document.html
Expand Up @@ -190,7 +190,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.21, distributed as part of the
2.22, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Exception.html
Expand Up @@ -79,7 +79,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.17, distributed as part of the
2.18, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down
2 changes: 1 addition & 1 deletion docs/src/Modules/Template/Filters.html
Expand Up @@ -600,7 +600,7 @@
[% WRAPPER section
title="VERSION"
-%]<p>
2.22, distributed as part of the
2.23, distributed as part of the
Template Toolkit version 2.04d, released on 29 August 2001.
</p>
[%- END %]
Expand Down

0 comments on commit d941238

Please sign in to comment.