Skip to content
Browse files

approach v2.03

git-svn-id: svn://svn.tt2.org/tt/Template2/trunk@131 d5a88997-0a34-4036-9ed2-92fb5d660d91
  • Loading branch information...
1 parent 18a3778 commit f4df3b6fb1bb0ad90d7aa0655f4007b75fd950f0 @abw committed Jun 14, 2001
Showing with 2,606 additions and 1,822 deletions.
  1. +146 −2 Changes
  2. +65 −1 MANIFEST
  3. +8 −0 MANIFEST.SKIP
  4. +110 −24 Makefile.PL
  5. +18 −10 README
  6. +49 −102 TODO
  7. +8 −1 bin/gifsplash
  8. +5 −4 bin/tpage
  9. +7 −7 bin/tt2inst
  10. +8 −6 bin/ttree
  11. +285 −19 docs/lib/docset/config
  12. +135 −59 docs/src/FAQ/FAQ.html
  13. +15 −42 docs/src/Library/HTML.html
  14. +10 −10 docs/src/Library/PostScript.html
  15. +103 −250 docs/src/Library/Splash.html
  16. +17 −63 docs/src/Manual/Config.html
  17. +17 −14 docs/src/Manual/Credits.html
  18. +46 −54 docs/src/Manual/Directives.html
  19. +182 −99 docs/src/Manual/Filters.html
  20. +12 −12 docs/src/Manual/Internals.html
  21. +16 −16 docs/src/Manual/Intro.html
  22. +232 −96 docs/src/Manual/Plugins.html
  23. +12 −17 docs/src/Manual/Refs.html
  24. +18 −18 docs/src/Manual/Syntax.html
  25. +23 −48 docs/src/Manual/Variables.html
  26. +164 −67 docs/src/Manual/Views.html
  27. +31 −102 docs/src/Modules/Template.html
  28. +19 −19 docs/src/Modules/Template/Base.html
  29. +26 −26 docs/src/Modules/Template/Config.html
  30. +16 −16 docs/src/Modules/Template/Constants.html
  31. +33 −43 docs/src/Modules/Template/Context.html
  32. +26 −26 docs/src/Modules/Template/Document.html
  33. +14 −14 docs/src/Modules/Template/Exception.html
  34. +192 −116 docs/src/Modules/Template/Filters.html
  35. +29 −29 docs/src/Modules/Template/Iterator.html
  36. +19 −27 docs/src/Modules/Template/Parser.html
  37. +20 −24 docs/src/Modules/Template/Plugin.html
  38. +16 −16 docs/src/Modules/Template/Plugin/Autoformat.html
  39. +14 −14 docs/src/Modules/Template/Plugin/CGI.html
  40. +27 −32 docs/src/Modules/Template/Plugin/DBI.html
  41. +16 −16 docs/src/Modules/Template/Plugin/Datafile.html
  42. +20 −14 docs/src/Modules/Template/Plugin/Date.html
  43. +16 −16 docs/src/Modules/Template/Plugin/Directory.html
  44. +19 −19 docs/src/Modules/Template/Plugin/Dumper.html
  45. +16 −26 docs/src/Modules/Template/Plugin/File.html
  46. +14 −14 docs/src/Modules/Template/Plugin/Format.html
  47. +14 −14 docs/src/Modules/Template/Plugin/Iterator.html
  48. +14 −14 docs/src/Modules/Template/Plugin/Pod.html
  49. +14 −14 docs/src/Modules/Template/Plugin/Table.html
  50. +14 −14 docs/src/Modules/Template/Plugin/URL.html
  51. +14 −14 docs/src/Modules/Template/Plugin/View.html
  52. +14 −14 docs/src/Modules/Template/Plugin/Wrap.html
  53. +151 −40 docs/src/Modules/Template/Plugin/XML/DOM.html
  54. +16 −16 docs/src/Modules/Template/Plugin/XML/RSS.html
  55. +16 −16 docs/src/Modules/Template/Plugin/XML/Simple.html
  56. +45 −16 docs/src/Modules/Template/Plugin/XML/XPath.html
Sorry, we could not display the entire diff because it was too big.
View
148 Changes
@@ -3,7 +3,7 @@
# Changes
#
# DESCRIPTION
-# Revision history for the Template Toolkit version 2.02, detailing
+# Revision history for the Template Toolkit version 2.03, detailing
# significant changes between versions, most recent first. Some
# way down the file you'll find a section detailing major changes from
# version 1.* to 2.* and a list of "Gotchas!" that you might have to
@@ -17,6 +17,149 @@
#========================================================================
#------------------------------------------------------------------------
+# Version 2.03 -
+#------------------------------------------------------------------------
+
+* Added new virtual methods 'item', 'list', 'hash' to each of scalar,
+ list and hash ops to Do The Right Thing to convert the original value
+ to what the caller wants. This is based on a patch supplied by Craig
+ Barratt...
+
+* ...which implements a number of new features to the stash, most
+ notably the ability to specify the context in which you want an
+ object method or subroutine to be called in by appending '.list' or
+ '.scalar' to a dotted variable. e.g. [% cgi.param('foo').scalar %].
+ I haven't folded this patch into the core Stash yet (other than
+ adopting the virtual methods described above) but it's provided as
+ an alternate stash implementation, Template::Stash::Context, which
+ you can create and specify to your Template object via the STASH
+ configuration option. I'd like to a) benchmark it and b) give
+ people the option of trying it out (and hacking on it?) before
+ integrating the new features into the default stash.
+
+* Applied a patch to add the Latex filter and GD plugin functionality,
+ thanks to the excellent work of Craig Barratt and Richard Tietjen.
+ In Craig's words:
+
+ Here is a new version of my Latex filter and GD plugin code.
+ (This adds a latex filter that supports PDF, PS and DVI output,
+ plus 16 or so plugins for the GD::* modules, allowing PNG, GIF
+ output.)
+
+ [Includes] Richard Tietjen's changes for the latex filter for WinXX
+ [which] didn't make it into the May 20th version. The new version
+ includes the correct changes for WinXX and also now has been
+ tested against TexLive and MikTeX on WinXX.
+
+ Craig's patch also included full documentation so you can read all about
+ it in the Manual and Module pages. In addition, the Makefile.PL now
+ searches for GD modules and external Latex programs and does some extra
+ user prompting for confirmation of Latex installation/configuration.
+ Not only that, but Craig also managed to roll in a couple of other
+ minor bug fixes and documention updates. Nice work!
+
+* Fixed the parser to accept fully dotted up variable assignments in
+ argument lists, e.g. in INCLUDE, etc. You can now do this:
+
+ [% INCLUDE html/head
+ html.head.title = 'My Title'
+ %]
+
+ Note however that the assignment to such variables is always "global",
+ even though INCLUDE claims to localise the stash. Remember that the
+ localisation does not perform a deep copy so the localised copy of
+ the 'html' variable might just be a copy of the reference to a previously
+ defined hash array. Thus, you modify the original albeit via a copy
+ of the reference to it. See INCLUDE section of
+ Template::Manual::Directives for further details.
+
+* Added 'base' option to Template::View. This allows one view to inherit
+ from another "base class" view. If a template isn't defined in a
+ derived view then it automatically asks its base view for it, and so
+ on up the inheritance tree.
+
+ [% VIEW myview.default
+ prefix = 'view/default/';
+ END
+ %]
+ [% VIEW myview.fancy
+ base = myview.default
+ prefix = 'view/fancy/';
+ END
+ %]
+
+ In this example, [% myview.fancy.header %] will be resolved as
+ [% INCLUDE view/fancy/header %] or [% INCLUDE view/default/header %]
+ if 'view/fancy/header' doesn't exist. Variables are also inherited.
+
+* Added the 'sealed' and 'silent' parameters to VIEW to allow view to be
+ optionally unsealed (allow external variable updates/creation) and
+ to silence warnings about attempts to update sealed variables,
+ respectively. See the Template::Manual::Views page for more info on
+ this and previosu item.
+
+* Added the HTML plugin for generating (very basic) HTML elements.
+ See the Template::Plugin::HTML documentation.
+
+* Added the present() and content() methods to XML::DOM::Node in the
+ XML::DOM plugin to make them work harmoniously with VIEWs. See the
+ Template::Plugin::XML::DOM documentation for further details.
+
+* Did the same for Template::Plugin::XML::XPath, adding present($view)
+ and content($view) methods to XML::XPath::Node::Element and a
+ present($view) method to XML::XPath::Node::Text. See the
+ Template::Plugin::XML::DOM documentation for more details.
+
+* Added the calc() method to the Date plugin to return an interface to
+ the Date::Calc module. e.g.
+
+ [% USE Date; calc = Date.calc %]
+ [% calc.Monday_of_Week(22, 2001).join('/') %]
+
+* Moved Template::Tutorial to Template::Tutorial::Web and added the
+ tutorial kindly donated by Dave Cross on generating and using data
+ files with TT as Template::Tutorial::Datafile. Template::Tutorial
+ is now an index to the tutorials.
+
+* Changed the bin/tt2inst script to no longer use the 'no_chdir' option
+ of the File::Find module which isn't supported in earlier version such
+ as distributed with pre-5.6.0 Perl. Thanks to a patch from Vivek
+ Khera <khera@kcilink.com>. Changed Makefile.PL to accept File::Spec
+ version 0.6 or later.
+
+* Applied a patch from Eric Cholet to fix a bug in META data items not
+ correctly escaping ' and \ characters.
+
+* Applied a patch to ttree from Leon Brocard print full path for ignored
+ files.
+
+* Fixed typo in the ttree help page which incorrectly listed debug
+ mode as '-d' (now '-dbg' as well as '--debug')
+
+* Fixed (hopefully once and for all!) the problem with choming the
+ final newline in a template. The last newline is now chomped just
+ like any other, depending on the POST_CHOMP flag and/or trailing '-'
+ in the directive. e.g.
+
+ [% FILTER latex('ps') %]
+ ...
+ [% END -%]
+
+ If you explicitly want a newline then make sure one is added to the
+ end of the template and don't enable POST_CHOMP or add a trailing '+'
+ in the directive, e.g.
+
+ [% INCLUDE footer +%]
+
+* Made a number of fixes to the HTML generated by the Splash! and HTML
+ libraries to make it conformant with HTML 3.2 specificiation. Added
+ DOCTYPE to html/header, ALT tags, ... added html/head, html/body and
+ html/html to do more thorough job using nested variables. Also added
+ html/config to load HTML plugin. Full conformance is still an issue,
+ but we're working on it...
+
+
+#------------------------------------------------------------------------
# Version 2.02 - 6th April 2001
#------------------------------------------------------------------------
@@ -129,7 +272,8 @@
* Makefile.PL now saves configuration options in '.defaults.cfg'
file, using these values as defaults when run again.
-* Removed duplicated $VERSION from DBI plugin.
+* Removed duplicated $VERSION from DBI and XML::DOM plugins, thanks
+ to Jonathan Leffler.
* Updated documentation to reflect new changes.
View
66 MANIFEST
@@ -59,6 +59,23 @@ docs/src/Modules/Template/Plugin/Directory.html
docs/src/Modules/Template/Plugin/Dumper.html
docs/src/Modules/Template/Plugin/File.html
docs/src/Modules/Template/Plugin/Format.html
+docs/src/Modules/Template/Plugin/GD/Constants.html
+docs/src/Modules/Template/Plugin/GD/Graph/area.html
+docs/src/Modules/Template/Plugin/GD/Graph/bars.html
+docs/src/Modules/Template/Plugin/GD/Graph/bars3d.html
+docs/src/Modules/Template/Plugin/GD/Graph/lines.html
+docs/src/Modules/Template/Plugin/GD/Graph/lines3d.html
+docs/src/Modules/Template/Plugin/GD/Graph/linespoints.html
+docs/src/Modules/Template/Plugin/GD/Graph/mixed.html
+docs/src/Modules/Template/Plugin/GD/Graph/pie.html
+docs/src/Modules/Template/Plugin/GD/Graph/pie3d.html
+docs/src/Modules/Template/Plugin/GD/Graph/points.html
+docs/src/Modules/Template/Plugin/GD/Image.html
+docs/src/Modules/Template/Plugin/GD/Polygon.html
+docs/src/Modules/Template/Plugin/GD/Text.html
+docs/src/Modules/Template/Plugin/GD/Text/Align.html
+docs/src/Modules/Template/Plugin/GD/Text/Wrap.html
+docs/src/Modules/Template/Plugin/HTML.html
docs/src/Modules/Template/Plugin/Iterator.html
docs/src/Modules/Template/Plugin/Pod.html
docs/src/Modules/Template/Plugin/Table.html
@@ -73,6 +90,7 @@ docs/src/Modules/Template/Plugins.html
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/Test.html
docs/src/Modules/index.html
docs/src/Release/Changes.html
@@ -82,7 +100,8 @@ docs/src/Release/index.html
docs/src/Tools/index.html
docs/src/Tools/tpage.html
docs/src/Tools/ttree.html
-docs/src/Tutorial/Tutorial.html
+docs/src/Tutorial/Datafile.html
+docs/src/Tutorial/Web.html
docs/src/Tutorial/index.html
docs/src/index.html
docs/style/plain/booktabs
@@ -303,8 +322,10 @@ examples/src/splash/tabsbox.html
examples/src/splash/tabset.html
examples/src/splash/text.html
images/splash/black/bl.gif
+images/splash/black/blhair.gif
images/splash/black/box.gif
images/splash/black/br.gif
+images/splash/black/brhair.gif
images/splash/black/diamond.gif
images/splash/black/dot.gif
images/splash/black/down.gif
@@ -316,8 +337,12 @@ images/splash/black/posbox.gif
images/splash/black/right.gif
images/splash/black/ring.gif
images/splash/black/ringdot.gif
+images/splash/black/single.gif
+images/splash/black/square.gif
images/splash/black/tl.gif
+images/splash/black/tlhair.gif
images/splash/black/tr.gif
+images/splash/black/trhair.gif
images/splash/black/up.gif
images/tt2power.gif
images/ttdotorg.gif
@@ -360,6 +385,23 @@ lib/Template/Plugin/Directory.pm
lib/Template/Plugin/Dumper.pm
lib/Template/Plugin/File.pm
lib/Template/Plugin/Format.pm
+lib/Template/Plugin/GD/Constants.pm
+lib/Template/Plugin/GD/Graph/area.pm
+lib/Template/Plugin/GD/Graph/bars.pm
+lib/Template/Plugin/GD/Graph/bars3d.pm
+lib/Template/Plugin/GD/Graph/lines.pm
+lib/Template/Plugin/GD/Graph/lines3d.pm
+lib/Template/Plugin/GD/Graph/linespoints.pm
+lib/Template/Plugin/GD/Graph/mixed.pm
+lib/Template/Plugin/GD/Graph/pie.pm
+lib/Template/Plugin/GD/Graph/pie3d.pm
+lib/Template/Plugin/GD/Graph/points.pm
+lib/Template/Plugin/GD/Image.pm
+lib/Template/Plugin/GD/Polygon.pm
+lib/Template/Plugin/GD/Text.pm
+lib/Template/Plugin/GD/Text/Align.pm
+lib/Template/Plugin/GD/Text/Wrap.pm
+lib/Template/Plugin/HTML.pm
lib/Template/Plugin/Iterator.pm
lib/Template/Plugin/Pod.pm
lib/Template/Plugin/Table.pm
@@ -374,10 +416,13 @@ lib/Template/Plugins.pm
lib/Template/Provider.pm
lib/Template/Service.pm
lib/Template/Stash.pm
+lib/Template/Stash/Context.pm
lib/Template/Test.pm
lib/Template/Tools/tpage.pod
lib/Template/Tools/ttree.pod
lib/Template/Tutorial.pod
+lib/Template/Tutorial/Datafile.pod
+lib/Template/Tutorial/Web.pod
lib/Template/View.pm
parser/Grammar.pm.skel
parser/Parser.yp
@@ -407,6 +452,7 @@ t/directive.t
t/directry.t
t/document.t
t/dom.t
+t/domview.t
t/dumper.t
t/error.t
t/evalperl.t
@@ -415,8 +461,18 @@ t/file.t
t/filter.t
t/foreach.t
t/format.t
+t/gd.t
+t/gdgraph.t
+t/gdgraph3d.t
+t/gdtext.t
+t/gdtextalign.t
+t/gdtextwrap.t
+t/html.t
t/include.t
t/iterator.t
+t/latex2dvi.t
+t/latex2pdf.t
+t/latex2ps.t
t/leak.t
t/list.t
t/macro.t
@@ -434,6 +490,7 @@ t/rss.t
t/service.t
t/skel.t
t/stash.t
+t/stashc.t
t/stop.t
t/switch.t
t/table.t
@@ -498,14 +555,19 @@ t/wrapper.t
t/xpath.t
templates/README
templates/html/bar
+templates/html/body
templates/html/box
templates/html/button
templates/html/cell
+templates/html/config
templates/html/edge
templates/html/edgebar
templates/html/edgebox
templates/html/footer
+templates/html/head
templates/html/header
+templates/html/html
+templates/html/html3.2
templates/html/indent
templates/html/item
templates/html/link
@@ -555,10 +617,12 @@ templates/ps/tilepage
templates/ps/tiles
templates/splash/bar
templates/splash/box
+templates/splash/breakdown
templates/splash/button
templates/splash/config
templates/splash/dropbox
templates/splash/frame
+templates/splash/hair
templates/splash/homelink
templates/splash/icon
templates/splash/menu
View
8 MANIFEST.SKIP
@@ -5,11 +5,19 @@
~$
\.old$
\.ttc$
+\.defaults\.cfg
^blib/
^pm_to_blib$
^bin/prep
+^bin/release
+^bin/docsrc
+^bin/tskel
^parser/Parser\.output
^docsrc/
+^templates/skeleton
+^project/
+^todo/
+^junk/
^docs/\w+\.cfg
^docs/html/(?!README)
^docs/ttree.cfg
View
134 Makefile.PL
@@ -7,15 +7,18 @@ select STDOUT;
use vars qw( $TT_INST_ROOT $TT_IMAGES $TT_RUN_DBI
$TT_BUILD_DOCS $TT_SPLASH_DOCS $TT_EXAMPLES
+ $TT_LATEX_PATH $TT_PDFLATEX_PATH $TT_DVIPS_PATH $TT_LATEX_ENABLE
$TT_SPLASH_THEME );
-$TT_INST_ROOT = '/usr/local/tt2';
-$TT_IMAGES = '/tt2/images';
-$TT_RUN_DBI = 'y';
-$TT_BUILD_DOCS = 'y';
-$TT_SPLASH_DOCS = 'y';
-$TT_EXAMPLES = 'y';
-$TT_SPLASH_THEME = 'default';
+$TT_INST_ROOT = '/usr/local/tt2';
+$TT_IMAGES = '/tt2/images';
+$TT_RUN_DBI = 'y';
+$TT_BUILD_DOCS = 'y';
+$TT_SPLASH_DOCS = 'y';
+$TT_EXAMPLES = 'y';
+$TT_SPLASH_THEME = 'default';
+$TT_LATEX_ENABLE = '';
+
my $TT_SPLASH_FG = '';
my $TT_SPLASH_BG = '';
@@ -51,7 +54,7 @@ my $SPLASH_STYLES = {
print <<EOF;
- Template Toolkit Version 2.02
+ Template Toolkit Version 2.03
=============================
Using $FLAVOUR defaults$DEFAULTS.
@@ -103,10 +106,10 @@ EOF
}
eval "use File::Spec";
-if ($@ or $File::Spec::VERSION < 0.8) {
+if ($@ or $File::Spec::VERSION < 0.6) {
die(<<EOF);
-The Template Toolkit requires that the File::Spec module (version 0.82
+The Template Toolkit requires that the File::Spec module (version 0.6
or later) first be installed. This is used by the File plugin. It is
available from CPAN:
@@ -132,10 +135,15 @@ available on your system.
EOF
foreach my $mods ( [ Text::Autoformat => \&check_taf ],
- [ XML::DOM => \&check_dom ],
- [ XML::RSS => \&check_rss ],
- [ XML::XPath => \&check_xpath ],
- [ DBI => \&dbi_config ] ) {
+ [ GD => undef ],
+ [ GD::Text => undef ],
+ [ GD::Graph => undef ],
+ [ GD::Graph3d => undef ],
+ [ Date::Calc => undef ],
+ [ XML::DOM => \&check_dom ],
+ [ XML::RSS => \&check_rss ],
+ [ XML::XPath => \&check_xpath ],
+ [ DBI => \&dbi_config ] ) {
my ($module, $code) = ref $mods ? @$mods : ($mods, 0);
printf(" %-16s ", $module);
@@ -154,6 +162,57 @@ foreach my $mods ( [ Text::Autoformat => \&check_taf ],
}
#------------------------------------------------------------------------
+# prompt for installation of latex filter
+#------------------------------------------------------------------------
+$TT_LATEX_PATH ||= findProgram($ENV{PATH}, "latex") || '';
+$TT_PDFLATEX_PATH ||= findProgram($ENV{PATH}, "pdflatex") || '';
+$TT_DVIPS_PATH ||= findProgram($ENV{PATH}, "dvips") || '';
+
+print <<EOF;
+
+TT2 supports PDF, DVI and PostScript output using the latex filter,
+implemented with the programs pdflatex, latex and dvips.
+
+Because the latex filter runs latex and pdflatex, template authors could
+use this feature to include any arbitrary file in their latex input, or
+also open an arbitrary output file, independent of the ABSOLUTE or
+RELATIVE configuration settings. This might create a security concern at
+your site. If you don't trust your template authors then don't enable
+the latex filter.
+
+I found the following locations for pdflatex, latex and dvips:
+ + pdflatex => $TT_PDFLATEX_PATH
+ + latex => $TT_LATEX_PATH
+ + dvips => $TT_DVIPS_PATH
+
+EOF
+
+if ( $TT_LATEX_PATH eq "" || $TT_PDFLATEX_PATH eq "" || $TT_DVIPS_PATH eq "" ) {
+ $TT_LATEX_ENABLE = 'n';
+}
+$TT_LATEX_ENABLE ||= 'y';
+$TT_LATEX_ENABLE = (
+ prompt('Do you want to enable the latex filter?',
+ $TT_LATEX_ENABLE) =~ /^y/i
+);
+if ( $TT_LATEX_ENABLE ) {
+ if (prompt('Are the pdflatex, latex and dvips paths ok?', 'y') !~ /^y/i) {
+ $TT_PDFLATEX_PATH = prompt('pdflatex path', $TT_PDFLATEX_PATH);
+ $TT_LATEX_PATH = prompt('latex path', $TT_LATEX_PATH);
+ $TT_DVIPS_PATH = prompt('dvips path', $TT_DVIPS_PATH);
+ }
+} else {
+ #
+ # Empty paths will cause the latex filter to throw an error
+ #
+ $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);
+
+#------------------------------------------------------------------------
# prompt for installation of optional libraries and other components
#------------------------------------------------------------------------
@@ -411,16 +470,21 @@ EOF
# write configuration defaults to file
#--------------------------------------------------------------------
open(FP, "> $DEFAULTS_FILE") || die "$DEFAULTS_FILE: $!\n";
- my ($ttdbi, $ttdocs, $ttsplash, $ttex) = map { $_ ? 'y' : 'n' }
- ( $TT_RUN_DBI, $TT_BUILD_DOCS, $TT_SPLASH_DOCS, $TT_EXAMPLES );
+ my ($ttdbi, $ttdocs, $ttsplash, $ttex, $ttlatex) = map { $_ ? 'y' : 'n' }
+ ( $TT_RUN_DBI, $TT_BUILD_DOCS, $TT_SPLASH_DOCS, $TT_EXAMPLES,
+ $TT_LATEX_ENABLE );
print FP <<EOF;
-\$TT_INST_ROOT = '$TT_INST_ROOT';
-\$TT_IMAGES = '$TT_IMAGES';
-\$TT_RUN_DBI = '$ttdbi';
-\$TT_BUILD_DOCS = '$ttdocs';
-\$TT_SPLASH_DOCS = '$ttsplash';
-\$TT_EXAMPLES = '$ttex';
-\$TT_SPLASH_THEME = '$TT_SPLASH_THEME';
+\$TT_INST_ROOT = '$TT_INST_ROOT';
+\$TT_IMAGES = '$TT_IMAGES';
+\$TT_RUN_DBI = '$ttdbi';
+\$TT_BUILD_DOCS = '$ttdocs';
+\$TT_SPLASH_DOCS = '$ttsplash';
+\$TT_EXAMPLES = '$ttex';
+\$TT_SPLASH_THEME = '$TT_SPLASH_THEME';
+\$TT_LATEX_ENABLE = '$ttlatex';
+\$TT_LATEX_PATH = '$TT_LATEX_PATH';
+\$TT_PDFLATEX_PATH = '$TT_PDFLATEX_PATH';
+\$TT_DVIPS_PATH = '$TT_DVIPS_PATH';
EOF
close(FP);
@@ -728,4 +792,26 @@ sub fix_file {
close(FP);
}
-
+#
+# findProgram($path, $prog)
+#
+# Find a program, $prog, by traversing the given directory path, $path.
+# Returns full path if the program is found.
+#
+# Written by Craig Barratt, Richard Tietjen add fixes for Win32.
+#
+sub findProgram {
+ my($path, $prog) = @_;
+ my $sep = $WIN32 ? qr/;/ : qr/:/;
+ foreach my $dir ( split($sep, $path) ) {
+ my $file = File::Spec->catfile($dir, $prog);
+ if ( !$WIN32 ) {
+ return $file if ( -x $file );
+ } else {
+ # Windows executables end in .xxx, exe precedes .bat and .cmd
+ foreach my $dx ( qw/exe bat cmd/ ) {
+ return "$file.$dx" if ( -x "$file.$dx" );
+ }
+ }
+ }
+}
View
28 README
@@ -1,9 +1,9 @@
Template Toolkit
- Version 2.02
+ Version 2.03
- 06 April 2001
+ 14 June 2001
Copyright (C) 1996-2001 Andy Wardley. All Rights Reserved
Copyright (C) 1998-2001 Canon Research Centre Europe Ltd.
@@ -16,7 +16,7 @@ QUICK START
The latest version of the Template Toolkit can be retrieved from:
- http://www.cpan.org/modules/Template/
+ http://www.cpan.org/modules/by-module/Template/
Fetch and install AppConfig 1.52 if you don't already have it installed.
Available from CPAN in:
@@ -30,6 +30,10 @@ need to install them. They're all available from CPAN if you do.
Text::Autoformat 1.03+
DBI 1.14+ (and relevant DBD drivers)
+ GD 1.32+
+ GD::Text 0.80+
+ GD::Graph 1.33+
+ GD::Graph3d 0.55+
Pod::POM 0.1+
XML::Parser 2.23+
XML::DOM 1.27+ (in libxml-enno)
@@ -38,8 +42,8 @@ need to install them. They're all available from CPAN if you do.
To install the Template Toolkit:
- tar zxf Template-Toolkit-2.02.tar.gz
- cd Template-Toolkit-2.02
+ tar zxf Template-Toolkit-2.03.tar.gz
+ cd Template-Toolkit-2.03
perl Makefile.PL
make
make test
@@ -241,6 +245,10 @@ all available from CPAN, should be installed:
------ --------
Autoformat Text::Autoformat 1.03+
DBI DBI 1.14+ and relevant DBD drivers
+ GD GD 1.32+
+ GD::Text GD::Text 0.80+
+ GD::Graph GD::Graph 1.33+
+ GD::Graph::lines3d GD::Graph3d 0.55+
Pod Pod::POM 0.1+
XML::DOM XML::DOM 1.27+ (requires XML::Parser 2.23+)
XML::RSS XML::RSS 0.9+ (ditto)
@@ -270,19 +278,19 @@ The Template Toolkit is distributed as a gzipped tar archive file:
Template-Toolkit-<version>.tar.gz
-where <version> represents the current version number, e.g. 2.02.
+where <version> represents the current version number, e.g. 2.03.
To install the Template Toolkit, unpack the distribution archive to
create an installation directory. Something like this:
- tar zxf Template-Toolkit-2.02.tar.gz
+ tar zxf Template-Toolkit-2.03.tar.gz
or
- gunzip Template-Toolkit-2.02.tar.gz
- tar xf Template-Toolkit-2.02.tar
+ gunzip Template-Toolkit-2.03.tar.gz
+ tar xf Template-Toolkit-2.03.tar
You can then 'cd' into the directory created,
- cd Template-Toolkit-2.02
+ cd Template-Toolkit-2.03
and perform the usual Perl installation procedure:
View
151 TODO
@@ -3,7 +3,7 @@
# TODO
#
# DESCRIPTION
-# TODO list for the Template Toolkit version 2.02, containing
+# TODO list for the Template Toolkit version 2.03, containing
# known bugs, limitations, planned enhancements, long term visions
# and a few whacky ideas.
#
@@ -15,9 +15,19 @@
#========================================================================
#------------------------------------------------------------------------
+# Pending 2.03
+#------------------------------------------------------------------------
+
+* Added splash hair + images
+
+#------------------------------------------------------------------------
# Miscellaneous
#------------------------------------------------------------------------
+* Errors thrown via the Error module are not correctly caught. I looked
+ at this briefly but the problem wasn't immediately obvious and needs some
+ more considered investigation.
+
* The 'eval' filter leaks memory, as reported by Colin Johnson. The
filter subroutine created contains a reference to the context and then
gets cached in the FILTER_CACHE item of the context. Hey presto -
@@ -64,21 +74,20 @@
no context reference is passed to the sub to allow it to act as a
template.
-* It would be useful if template components had some notion of inheritance
- so that a 'derived' component could call on the 'super' component.
- This is something that is hacked in as part of the VIEW feature, but
- should be properly added as a facility.
-
* The issue of CGI::Carp throwing non-reference error might need closer
investigation.
+* It would be nice if there was an option so that the files generated
+ under the COMPILE_DIR are relative to the INCLUDE_PATH and not absolute.
+ This could cause potential conflicts (e.g. if INCLUDE_PATH changes
+ between sessions and the same files in different INCLUDE_PATH dirs
+ maps to the samed compiled version) but is convenient for those times
+ when you know that's not going to be a problem.
#------------------------------------------------------------------------
# Documentation
#------------------------------------------------------------------------
-* Add the XML tutorial, kindly donated by Dave Cross.
-
* Extend the FAQ.
* Document the Splash! library properly, once the interface is a little
@@ -143,6 +152,12 @@
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
@@ -191,74 +206,6 @@
}
%]
-* Make IF, FOR, WHILE, etc., available in lower case by default (or by
- configuration option). I think any constructs like these which map
- to regular programming language constructs (i.e. can be translated
- directly to Perl) shouldn't have to stick out like a sore thumb.
- UPPER CASE should be reserved for DIRECTIVES which actuate a
- facility feature. Lower case is used for the very restricted set of
- reserved words that implement the language framework (if, while,
- for, else, try, catch, and, or, not, etc.). FOREACH should probably
- be a directive as it invokes an iterator ("for" would be a fast
- implementation which has no 'loop' iterator).
-
- [% for a = [ 1 2 3 ] {
- if b == a {
- INCLUDE foo
- }
- else {
- INCLUDE bar
- }
- }
- %]
-
-* The above point implies a general rule of lower case words being
- runtime variables or one of a small number of reserved words,
- and UPPER CASE being compile time directives which perform some
- rewriting (e.g. code generation).
-
- [% INCLUDE filename a='b', c='d' %]
-
- is a compile time directive (UPPER CASE) which calls a sub to do the
- code generation of:
-
- $output .= $context->include('filename', { a => 'b', c => 'd' });
-
- the above directive is therefore also equivalent to:
-
- [% tt2.include('filename', a='b', c='d') %]
-
-* We might want to tie the above in with namespaces. This
- would permit disambiguation of directives loaded from different
- facilities.
-
- [% TT2.INCLUDE ... %] # UPPER == COMPILE TIME
- [% SQL.QUERY ... %]
-
- vs # rewritten to...
-
- [% tt2.include(...) %] # lower == runtime
- [% sql.query(...) %]
-
- What about the DBI plugin (for example):
-
- [% USE DBI(...) %]
- [% DBI.query %]
-
- We can't assume that CAPITAL implies compile time in this case
- unless we look at the method (i.e. second element) not the first,
- and that's too confusing. IMHO. Maybe use ':' instead as the compile
- time directive delimiter?
-
- [% TT2:INCLUDE ... %]
-
- Or maybe 'TT2' is the universal prefix into which facilties are loaded?
-
- [% TT2.VIEW.INCLUDE ... %]
- => $view->include(...) === [% tt2.view.include(...) %]
- [% TT2.SQL.INCLUDE %]
- => $sql->include(...) === [% tt2.sql.include(...) %]
-
* Ability to set different parser options for BLOCK definitions, etc.
[% BLOCK header
@@ -287,8 +234,10 @@
[% INCLUDE back_to_normal %]
- This will require some fairly serious work on the parser.
- Some experimentation underway, see P2.pm - got half a lexer working.
+ This is likely to be a TT3 feature and I've already got the basic
+ parser for this up and running. It might get back-pactched into
+ version 2, otherwise you might have to wait for the first alpha
+ release of verion 3.
* Note that this might also allow a default view to be set for a BLOCK:
@@ -309,7 +258,7 @@
#------------------------------------------------------------------------
* We need a way to easily enable/disable certain plugins. This should
- be addressed by facility provision.
+ be addressed by facility provision. Probably something for v3.
* The Text::Autoformat module has some problems with versions of Perl
prior to 5.6.0 when using a locale which has a decimal separator
@@ -331,29 +280,11 @@
it in terms of the Table plugin. I think the jury is still out on the
matter of whether it counts as duplicated functionality.
-* The childrenTotemplate() and allChildrenToTemplate() methods of the
- XML::DOM can send Perl into a deep recursive loop. In fact, the the
- XML::DOM module itself seems to be a little unstable in general -
- I've had to disable one of the tests in t/dom.t which tests the
- parser creation failing, as it seems to be causing a segfault core
- dump during global cleanup a the end of the script. The
- toTemplate() method and friends will be replaced by the VIEW
- facility (in some form). Rather than build functionality into
- XML::DOM to present a data structure via the TT, it will be the
- print() method of a VIEW which walks the tree and processes the
- appropriate template. It's difficult to explain simply in a few
- words, but suffice it to say that it's very clever, extremely powerful
- and deceptively easy to use. Big wins all around. See next item...
-
-* A related problem to the above is that the XML::XPath plugin doesn't
- have a toTemplate() method, or something similar, to allow easy
- conversion of mixed XML content via template elements. And because
- of the way that Matt's implemented the XPath module (to cleverly
- avoid circular references) I'm not sure there's an easy/obvious way
- to add one. The solution comes as part of the VIEW model. A
- generic PerlSAX -> VIEW interface should be provided, making it
- possible to easily display XML content from XML::DOM, XML::XPath, or
- any other SAX compliant source.
+* A more general solution for XML (e.g. DOM, XPath, etc) would be for
+ TT to support a PerlSAX handler which generates the appropriate
+ callbacks to the view. This should make it possible to easily
+ display XML content from XML::DOM, XML::XPath, or any other SAX
+ compliant source.
Something like this:
@@ -436,6 +367,22 @@ To include:
* May be wise to move Splash out to a separate distribution.
+Randal Schwartz highlighted some problems with non-compliant HTML
+being generated. These include:
+
+* no DOCTYPE declaration (added to html/header)
+
+* ALT attribute missing from many <img> tags
+
+* <font ...><table>...</table></font> is illegal (not sure where this
+ gets done)
+
+* <tr> shouldn't have HEIGHT attribute
+
+* <H3> block element inside inline element
+
+* <A> not allowed here (not sure)
+
#------------------------------------------------------------------------
# Test Suite
View
9 bin/gifsplash
@@ -69,7 +69,14 @@ sub load_gifs {
@files = grep { /\.gif$/ } readdir(DIR);
closedir DIR;
- print STDERR "Found ", scalar @files, " GIF files\n" if $verbose;
+ if ($verbose) {
+ my $filenames = '';
+ my @tmpfiles = @files;
+ while (@tmpfiles) {
+ $filenames .= ' ' . join(', ', splice(@tmpfiles, 0, 6)) . "\n";
+ }
+ print STDERR "Found ", scalar @files, " GIF files:\n$filenames";
+ }
foreach my $f (@files) {
open(GIF, "$gifdir/$f") || die "$gifdir/$f: $!\n";
View
9 bin/tpage
@@ -107,10 +107,13 @@ Andy Wardley E<lt>abw@kfs.orgE<gt>
L<http://www.andywardley.com/|http://www.andywardley.com/>
+
+
+
=head1 VERSION
-2.07, distributed as part of the
-Template Toolkit version 2.02, released on 06 April 2001.
+2.09, distributed as part of the
+Template Toolkit version 2.03, released on 14 June 2001.
=head1 COPYRIGHT
@@ -123,5 +126,3 @@ modify it under the same terms as Perl itself.
=head1 SEE ALSO
L<ttree|Template::Tools::ttree>
-
-
View
14 bin/tt2inst
@@ -14,6 +14,7 @@ use Getopt::Std;
use File::Find;
use File::Path;
use File::Copy;
+use File::Spec;
use Cwd;
my $PROGRAM = 'tt2inst';
@@ -43,20 +44,19 @@ foreach my $dir (@INSTDIRS) {
print STDERR " + $dir\n"
if $verbose;
- find({
- wanted => \&install_file,
- no_chdir => 1,
- }, $dir);
+ find(\&install_file, $dir);
}
sub install_file {
- return if /\bCVS\b/ || m[^docs/html/(?!README)];
+ my $f = $File::Find::name;
+ return if $f =~ /\bCVS\b/ || m[^docs/html/(?!README)];
if (-d) {
- my $dir = "$tt2inst/$_";
+ my $dir = File::Spec->catfile($tt2inst, $f);
mkpath($dir) unless -d $dir;
return;
}
- copy($_, "$tt2inst/$_") || die "$tt2inst/$_: $!\n";
+ my $dest = File::Spec->catfile($tt2inst, $f);
+ copy($_, $dest) || die "$dest: $!\n";
}
View
14 bin/ttree
@@ -187,7 +187,7 @@ sub process_tree {
# check against ignore list
foreach $check (@$ignore) {
if ($path =~ /$check/) {
- printf " - %-32s (ignored, matches /$check/)\n", $file
+ printf " - %-32s (ignored, matches /$check/)\n", $path
if $verbose;
next FILE;
}
@@ -338,6 +338,7 @@ sub read_config {
'template_pre_process|pre_process|preprocess=s@',
'template_post_process|post_process|postprocess=s@',
'template_process|process=s',
+ 'template_recursion|recursion',
'template_default|default=s',
'template_error|error=s',
'template_start_tag|start_tag|starttag=s',
@@ -481,8 +482,8 @@ Options:
-p (--preserve) Preserve file ownership and permission
-n (--nothing) Do nothing, just print summary (enables -v)
-v (--verbose) Verbose mode
- -d (--debug) Debug mode
-h (--help) This help
+ -dbg (--debug) Debug mode
-s DIR (--src=DIR) Source directory
-d DIR (--dest=DIR) Destination directory
-c DIR (--cfg=DIR) Location of configuration files
@@ -621,10 +622,13 @@ Andy Wardley E<lt>abw@kfs.orgE<gt>
L<http://www.andywardley.com/|http://www.andywardley.com/>
+
+
+
=head1 VERSION
-2.07, distributed as part of the
-Template Toolkit version 2.02, released on 06 April 2001.
+2.09, distributed as part of the
+Template Toolkit version 2.03, released on 14 June 2001.
=head1 COPYRIGHT
@@ -637,5 +641,3 @@ modify it under the same terms as Perl itself.
=head1 SEE ALSO
L<tpage|Template::Tools::tpage>
-
-
View
304 docs/lib/docset/config
@@ -7,39 +7,52 @@ docset => {
Tutorial => {
id => 'Tutorial',
name => 'Tutorial',
- title => 'Template Tutorial',
+ title => 'Template Tutorials',
url => 'Tutorial',
uplink => '',
author => 'abw',
- about => 'Introductory tutorial for the Template Toolkit',
+ about => 'Template Toolkit Tutorials',
prev => '',
next => 'Manual',
pages => {
- Tutorial => {
- id => 'Tutorial',
- name => 'Tutorial',
- title => 'Tutorial',
- podname => 'Template::Tutorial',
- url => 'Tutorial/Tutorial.html',
+ Web => {
+ id => 'Web',
+ name => 'Web',
+ title => 'Web',
+ podname => 'Template::Tutorial::Web',
+ url => 'Tutorial/Web.html',
uplink => '..',
author => 'abw',
- about => 'Tutorial on using and abusing the Template Toolkit',
+ about => 'Generating Web Content Using the Template Toolkit',
prev => '',
+ next => 'Datafile',
+ },
+ Datafile => {
+ id => 'Datafile',
+ name => 'Datafile',
+ title => 'Datafile',
+ podname => 'Template::Tutorial::Datafile',
+ url => 'Tutorial/Datafile.html',
+ uplink => '..',
+ author => 'dave',
+ about => 'Creating Data Output Files Using the Template Toolkit',
+ prev => 'Web',
next => '',
},
index => {
- id => 'Tutorial',
- name => 'Tutorial',
- title => 'Tutorial',
+ id => 'index',
+ name => '',
+ title => 'Template Tutorials',
podname => 'Template::Tutorial',
- url => 'Tutorial/Tutorial.html',
+ url => 'Tutorial/index.html',
uplink => '..',
author => 'abw',
- about => 'Tutorial on using and abusing the Template Toolkit',
+ about => 'Template Toolkit Tutorials',
},
},
pagelist => [
- 'Tutorial',
+ 'Web',
+ 'Datafile',
],
},
Manual => {
@@ -399,6 +412,18 @@ docset => {
author => 'abw',
about => 'Magical storage for template variables',
prev => 'Service',
+ next => 'Stash_Context',
+ },
+ Stash_Context => {
+ id => 'Stash_Context',
+ name => 'Template::Stash::Context',
+ title => 'Template::Stash::Context',
+ podname => 'Template::Stash::Context',
+ url => 'Modules/Template/Stash/Context.html',
+ uplink => '../../..',
+ author => 'abw',
+ about => 'Experimetal stash allowing list/scalar context definition',
+ prev => 'Stash',
next => 'Test',
},
Test => {
@@ -410,7 +435,7 @@ docset => {
uplink => '../..',
author => 'abw',
about => 'Module for automating TT2 test scripts',
- prev => 'Stash',
+ prev => 'Stash_Context',
next => 'Plugin_Autoformat',
},
Plugin_Autoformat => {
@@ -519,6 +544,210 @@ docset => {
author => 'abw',
about => 'Plugin to create formatting functions',
prev => 'Plugin_File',
+ next => 'Plugin_GD_Image',
+ },
+ Plugin_GD_Image => {
+ id => 'Plugin_GD_Image',
+ name => 'Template::Plugin::GD::Image',
+ title => 'Template::Plugin::GD::Image',
+ podname => 'Template::Plugin::GD::Image',
+ url => 'Modules/Template/Plugin/GD/Image.html',
+ uplink => '../../../..',
+ author => 'craig',
+ about => 'Interface to GD Graphics Library',
+ prev => 'Plugin_Format',
+ next => 'Plugin_GD_Polygon',
+ },
+ Plugin_GD_Polygon => {
+ id => 'Plugin_GD_Polygon',
+ name => 'Template::Plugin::GD::Polygon',
+ title => 'Template::Plugin::GD::Polygon',
+ podname => 'Template::Plugin::GD::Polygon',
+ url => 'Modules/Template/Plugin/GD/Polygon.html',
+ uplink => '../../../..',
+ author => 'craig',
+ about => 'Interface to GD module Polygon class',
+ prev => 'Plugin_GD_Image',
+ next => 'Plugin_GD_Constants',
+ },
+ Plugin_GD_Constants => {
+ id => 'Plugin_GD_Constants',
+ name => 'Template::Plugin::GD::Constants',
+ title => 'Template::Plugin::GD::Constants',
+ podname => 'Template::Plugin::GD::Constants',
+ url => 'Modules/Template/Plugin/GD/Constants.html',
+ uplink => '../../../..',
+ author => 'craig',
+ about => 'Interface to GD module constants',
+ prev => 'Plugin_GD_Polygon',
+ next => 'Plugin_GD_Text',
+ },
+ Plugin_GD_Text => {
+ id => 'Plugin_GD_Text',
+ name => 'Template::Plugin::GD::Text',
+ title => 'Template::Plugin::GD::Text',
+ podname => 'Template::Plugin::GD::Text',
+ url => 'Modules/Template/Plugin/GD/Text.html',
+ uplink => '../../../..',
+ author => 'craig',
+ about => 'Text utilities for use with GD',
+ prev => 'Plugin_GD_Constants',
+ next => 'Plugin_GD_Text_Align',
+ },
+ Plugin_GD_Text_Align => {
+ id => 'Plugin_GD_Text_Align',
+ name => 'Template::Plugin::GD::Text::Align',
+ title => 'Template::Plugin::GD::Text::Align',
+ podname => 'Template::Plugin::GD::Text::Align',
+ url => 'Modules/Template/Plugin/GD/Text/Align.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Draw aligned strings in GD images',
+ prev => 'Plugin_GD_Text',
+ next => 'Plugin_GD_Text_Wrap',
+ },
+ Plugin_GD_Text_Wrap => {
+ id => 'Plugin_GD_Text_Wrap',
+ name => 'Template::Plugin::GD::Text::Wrap',
+ title => 'Template::Plugin::GD::Text::Wrap',
+ podname => 'Template::Plugin::GD::Text::Wrap',
+ url => 'Modules/Template/Plugin/GD/Text/Wrap.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Break and wrap strings in GD images',
+ prev => 'Plugin_GD_Text_Align',
+ next => 'Plugin_GD_Graph_lines',
+ },
+ Plugin_GD_Graph_lines => {
+ id => 'Plugin_GD_Graph_lines',
+ name => 'Template::Plugin::GD::Graph::lines',
+ title => 'Template::Plugin::GD::Graph::lines',
+ podname => 'Template::Plugin::GD::Graph::lines',
+ url => 'Modules/Template/Plugin/GD/Graph/lines.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create line graphs with axes and legends',
+ prev => 'Plugin_GD_Text_Wrap',
+ next => 'Plugin_GD_Graph_lines3d',
+ },
+ Plugin_GD_Graph_lines3d => {
+ id => 'Plugin_GD_Graph_lines3d',
+ name => 'Template::Plugin::GD::Graph::lines3d',
+ title => 'Template::Plugin::GD::Graph::lines3d',
+ podname => 'Template::Plugin::GD::Graph::lines3d',
+ url => 'Modules/Template/Plugin/GD/Graph/lines3d.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create 3D line graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_lines',
+ next => 'Plugin_GD_Graph_bars',
+ },
+ Plugin_GD_Graph_bars => {
+ id => 'Plugin_GD_Graph_bars',
+ name => 'Template::Plugin::GD::Graph::bars',
+ title => 'Template::Plugin::GD::Graph::bars',
+ podname => 'Template::Plugin::GD::Graph::bars',
+ url => 'Modules/Template/Plugin/GD/Graph/bars.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create bar graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_lines3d',
+ next => 'Plugin_GD_Graph_bars3d',
+ },
+ Plugin_GD_Graph_bars3d => {
+ id => 'Plugin_GD_Graph_bars3d',
+ name => 'Template::Plugin::GD::Graph::bars3d',
+ title => 'Template::Plugin::GD::Graph::bars3d',
+ podname => 'Template::Plugin::GD::Graph::bars3d',
+ url => 'Modules/Template/Plugin/GD/Graph/bars3d.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create 3D bar graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_bars',
+ next => 'Plugin_GD_Graph_points',
+ },
+ Plugin_GD_Graph_points => {
+ id => 'Plugin_GD_Graph_points',
+ name => 'Template::Plugin::GD::Graph::points',
+ title => 'Template::Plugin::GD::Graph::points',
+ podname => 'Template::Plugin::GD::Graph::points',
+ url => 'Modules/Template/Plugin/GD/Graph/points.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create point graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_bars3d',
+ next => 'Plugin_GD_Graph_linespoints',
+ },
+ Plugin_GD_Graph_linespoints => {
+ id => 'Plugin_GD_Graph_linespoints',
+ name => 'Template::Plugin::GD::Graph::linespoints',
+ title => 'Template::Plugin::GD::Graph::linespoints',
+ podname => 'Template::Plugin::GD::Graph::linespoints',
+ url => 'Modules/Template/Plugin/GD/Graph/linespoints.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create line/point graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_points',
+ next => 'Plugin_GD_Graph_area',
+ },
+ Plugin_GD_Graph_area => {
+ id => 'Plugin_GD_Graph_area',
+ name => 'Template::Plugin::GD::Graph::area',
+ title => 'Template::Plugin::GD::Graph::area',
+ podname => 'Template::Plugin::GD::Graph::area',
+ url => 'Modules/Template/Plugin/GD/Graph/area.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create area graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_linespoints',
+ next => 'Plugin_GD_Graph_mixed',
+ },
+ Plugin_GD_Graph_mixed => {
+ id => 'Plugin_GD_Graph_mixed',
+ name => 'Template::Plugin::GD::Graph::mixed',
+ title => 'Template::Plugin::GD::Graph::mixed',
+ podname => 'Template::Plugin::GD::Graph::mixed',
+ url => 'Modules/Template/Plugin/GD/Graph/mixed.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create mixed graphs with axes and legends',
+ prev => 'Plugin_GD_Graph_area',
+ next => 'Plugin_GD_Graph_pie',
+ },
+ Plugin_GD_Graph_pie => {
+ id => 'Plugin_GD_Graph_pie',
+ name => 'Template::Plugin::GD::Graph::pie',
+ title => 'Template::Plugin::GD::Graph::pie',
+ podname => 'Template::Plugin::GD::Graph::pie',
+ url => 'Modules/Template/Plugin/GD/Graph/pie.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create pie charts with legends',
+ prev => 'Plugin_GD_Graph_mixed',
+ next => 'Plugin_GD_Graph_pie3d',
+ },
+ Plugin_GD_Graph_pie3d => {
+ id => 'Plugin_GD_Graph_pie3d',
+ name => 'Template::Plugin::GD::Graph::pie3d',
+ title => 'Template::Plugin::GD::Graph::pie3d',
+ podname => 'Template::Plugin::GD::Graph::pie3d',
+ url => 'Modules/Template/Plugin/GD/Graph/pie3d.html',
+ uplink => '../../../../..',
+ author => 'craig',
+ about => 'Create 3D pie charts with legends',
+ prev => 'Plugin_GD_Graph_pie',
+ next => 'Plugin_HTML',
+ },
+ Plugin_HTML => {
+ id => 'Plugin_HTML',
+ name => 'Template::Plugin::HTML',
+ title => 'Template::Plugin::HTML',
+ podname => 'Template::Plugin::HTML',
+ url => 'Modules/Template/Plugin/HTML.html',
+ uplink => '../../..',
+ author => 'abw',
+ about => 'Plugin to create HTML elements',
+ prev => 'Plugin_GD_Graph_pie3d',
next => 'Plugin_Iterator',
},
Plugin_Iterator => {
@@ -530,7 +759,7 @@ docset => {
uplink => '../../..',
author => 'abw',
about => 'Plugin to create iterators (Template::Iterator)',
- prev => 'Plugin_Format',
+ prev => 'Plugin_HTML',
next => 'Plugin_Pod',
},
Plugin_Pod => {
@@ -668,6 +897,7 @@ docset => {
'Provider',
'Service',
'Stash',
+ 'Stash_Context',
'Test',
'Plugin_Autoformat',
'Plugin_CGI',
@@ -678,6 +908,23 @@ docset => {
'Plugin_Dumper',
'Plugin_File',
'Plugin_Format',
+ 'Plugin_GD_Image',
+ 'Plugin_GD_Polygon',
+ 'Plugin_GD_Constants',
+ 'Plugin_GD_Text',
+ 'Plugin_GD_Text_Align',
+ 'Plugin_GD_Text_Wrap',
+ 'Plugin_GD_Graph_lines',
+ 'Plugin_GD_Graph_lines3d',
+ 'Plugin_GD_Graph_bars',
+ 'Plugin_GD_Graph_bars3d',
+ 'Plugin_GD_Graph_points',
+ 'Plugin_GD_Graph_linespoints',
+ 'Plugin_GD_Graph_area',
+ 'Plugin_GD_Graph_mixed',
+ 'Plugin_GD_Graph_pie',
+ 'Plugin_GD_Graph_pie3d',
+ 'Plugin_HTML',
'Plugin_Iterator',
'Plugin_Pod',
'Plugin_Table',
@@ -918,8 +1165,9 @@ docset => {
'Release',
],
links => {
- 'Template::Tutorial' => 'Tutorial/Tutorial.html',
- 'Template::Tutorial' => 'Tutorial/Tutorial.html',
+ 'Template::Tutorial::Web' => 'Tutorial/Web.html',
+ 'Template::Tutorial::Datafile' => 'Tutorial/Datafile.html',
+ 'Template::Tutorial' => 'Tutorial/index.html',
'Template::Manual::Intro' => 'Manual/Intro.html',
'Template::Manual::Syntax' => 'Manual/Syntax.html',
'Template::Manual::Variables' => 'Manual/Variables.html',
@@ -947,6 +1195,7 @@ docset => {
'Template::Provider' => 'Modules/Template/Provider.html',
'Template::Service' => 'Modules/Template/Service.html',
'Template::Stash' => 'Modules/Template/Stash.html',
+ 'Template::Stash::Context' => 'Modules/Template/Stash/Context.html',
'Template::Test' => 'Modules/Template/Test.html',
'Template::Plugin::Autoformat' => 'Modules/Template/Plugin/Autoformat.html',
'Template::Plugin::CGI' => 'Modules/Template/Plugin/CGI.html',
@@ -957,6 +1206,23 @@ docset => {
'Template::Plugin::Dumper' => 'Modules/Template/Plugin/Dumper.html',
'Template::Plugin::File' => 'Modules/Template/Plugin/File.html',
'Template::Plugin::Format' => 'Modules/Template/Plugin/Format.html',
+ 'Template::Plugin::GD::Image' => 'Modules/Template/Plugin/GD/Image.html',
+ 'Template::Plugin::GD::Polygon' => 'Modules/Template/Plugin/GD/Polygon.html',
+ 'Template::Plugin::GD::Constants' => 'Modules/Template/Plugin/GD/Constants.html',
+ 'Template::Plugin::GD::Text' => 'Modules/Template/Plugin/GD/Text.html',
+ 'Template::Plugin::GD::Text::Align' => 'Modules/Template/Plugin/GD/Text/Align.html',
+ 'Template::Plugin::GD::Text::Wrap' => 'Modules/Template/Plugin/GD/Text/Wrap.html',
+ 'Template::Plugin::GD::Graph::lines' => 'Modules/Template/Plugin/GD/Graph/lines.html',
+ 'Template::Plugin::GD::Graph::lines3d' => 'Modules/Template/Plugin/GD/Graph/lines3d.html',
+ 'Template::Plugin::GD::Graph::bars' => 'Modules/Template/Plugin/GD/Graph/bars.html',
+ 'Template::Plugin::GD::Graph::bars3d' => 'Modules/Template/Plugin/GD/Graph/bars3d.html',
+ 'Template::Plugin::GD::Graph::points' => 'Modules/Template/Plugin/GD/Graph/points.html',
+ 'Template::Plugin::GD::Graph::linespoints' => 'Modules/Template/Plugin/GD/Graph/linespoints.html',
+ 'Template::Plugin::GD::Graph::area' => 'Modules/Template/Plugin/GD/Graph/area.html',
+ 'Template::Plugin::GD::Graph::mixed' => 'Modules/Template/Plugin/GD/Graph/mixed.html',
+ 'Template::Plugin::GD::Graph::pie' => 'Modules/Template/Plugin/GD/Graph/pie.html',
+ 'Template::Plugin::GD::Graph::pie3d' => 'Modules/Template/Plugin/GD/Graph/pie3d.html',
+ 'Template::Plugin::HTML' => 'Modules/Template/Plugin/HTML.html',
'Template::Plugin::Iterator' => 'Modules/Template/Plugin/Iterator.html',
'Template::Plugin::Pod' => 'Modules/Template/Plugin/Pod.html',
'Template::Plugin::Table' => 'Modules/Template/Plugin/Table.html',
View
194 docs/src/FAQ/FAQ.html
@@ -12,60 +12,57 @@
page = 'FAQ'
%]
[% WRAPPER toc;
- INCLUDE tocitem title='DESCRIPTION'
- subs=['General Questions', 'Language', 'Plugins', 'Extending the Template Toolkit', 'Miscellaneous'];
- INCLUDE tocitem title='AUTHOR';
- INCLUDE tocitem title='VERSION';
- INCLUDE tocitem title='COPYRIGHT';
+ INCLUDE tocitem title="DESCRIPTION";
+ INCLUDE tocitem title="General Questions"
+ subs=["Why is the sky blue?"];
+ INCLUDE tocitem title="Template Toolkit Language"
+ subs=["Why doesn't $tt_start_tag a = b IF c $tt_end_tag work as expected?"];
+ INCLUDE tocitem title="Plugins"
+ subs=["How do I get the Table plugin to order data across rather than down?"];
+ INCLUDE tocitem title="Extending the Template Toolkit"
+ subs=["Can I serve templates from a database?", "Can I fetch templates via http?", "Miscellaneous"];
+ INCLUDE tocitem title="AUTHOR";
+ INCLUDE tocitem title="VERSION";
+ INCLUDE tocitem title="COPYRIGHT";
END
%]
<!-- Pod to HTML conversion by the Template Toolkit version 2 -->
[% WRAPPER section
- title='DESCRIPTION'
+ title="DESCRIPTION"
-%]<p>
This is the Frequently Asked Questions list for the Template Toolkit.
More accurately, it's a very thin placeholder for where the FAQ will
soon be.
</p>
-[% WRAPPER subsection
- title = 'General Questions'
--%]
-<ul>
-
-<li><b>Why is the sky blue?</b><br>
-<p>
+[%- END %]
+[% WRAPPER section
+ title="General Questions"
+-%][% WRAPPER subsection
+ title = "Why is the sky blue?"
+-%]<p>
Something to do with refraction.
</p>
-
-
-</ul>
-
[%- END %]
-[% WRAPPER subsection
- title = 'Language'
--%]
-<ul>
-
-<li><b>Why doesn't [% tt_start_tag %] a = b IF c [% tt_end_tag %] work as expected?</b><br>
-<p>
-Because the parser interprets it as [% tt_start_tag %] a = (b IF c) [% tt_end_tag %].
+[%- END %]
+[% WRAPPER section
+ title="Template Toolkit Language"
+-%][% WRAPPER subsection
+ title = "Why doesn't $tt_start_tag a = b IF c $tt_end_tag work as expected?"
+-%]<p>
+Because the parser interprets it as
</p>
+<pre> [% tt_start_tag %] a = (b IF c) [% tt_end_tag %]</pre>
<p>
Do this instead:
</p>
<pre> [% tt_start_tag %] SET a = b IF c [% tt_end_tag %]</pre>
-
-
-</ul>
-
[%- END %]
-[% WRAPPER subsection
- title = 'Plugins'
--%]
-<ul>
-
-<li><b>Using the Table plugin, how do I order the data to go across rather than down?</b><br>
-<p>
+[%- END %]
+[% WRAPPER section
+ title="Plugins"
+-%][% WRAPPER subsection
+ title = "How do I get the Table plugin to order data across rather than down?"
+-%]<p>
Order the data into rows:
</p>
<pre> Steve Karen Jeff
@@ -83,29 +80,110 @@
[% tt_start_tag %] FOREACH item = column [% tt_end_tag %]
&lt;td&gt;[% tt_start_tag %] item [% tt_end_tag %]&lt;/td&gt;
[% tt_start_tag %] END [% tt_end_tag %]</pre>
-
-
-</ul>
-
[%- END %]
-[% WRAPPER subsection
- title = 'Extending the Template Toolkit'
--%]
-<ul>
-
-<li><b>Can I serve templates from a database?</b><br>
-<p>
+[%- END %]
+[% WRAPPER section
+ title="Extending the Template Toolkit"
+-%][% WRAPPER subsection
+ title = "Can I serve templates from a database?"
+-%]<p>
Short answer: yes, Chris Nandor has done this for Slash. You need to
subclass Template::Provider. See the mailing list archives for further
info.
</p>
-
-
-</ul>
-
[%- END %]
[% WRAPPER subsection
- title = 'Miscellaneous'
+ title = "Can I fetch templates via http?"
+-%]<p>
+To do the job properly, you should sublcass Template::Provider to
+Template::Provider::HTTP and use a PREFIX_MAP option to bind the
+'http' template prefix to that particular provider (you may want to
+go digging around in the <file>Changes</file> file around version 2.01 for
+more info on PREFIX_MAP - it may not be properly documented anywher
+else...yet!). e.g. (untested due to lack of existing HTTP Provider
+- patches welcome!).
+</p>
+<pre> use Template::Provider::HTTP;</pre>
+<pre> my $file = Template::Provider( INCLUDE_PATH =&gt; [...] );
+ my $http = Template::Provider::HTTP-&gt;new(...);
+ my $tt2 = Template-&gt;new({
+ LOAD_TEMPLATES =&gt; [ $file, $http ],
+ PREFIX_MAP =&gt; {
+ file =&gt; '0', # file:foo.html
+ http =&gt; '1', # http:foo.html
+ default =&gt; '0', # foo.html =&gt; file:foo.html
+ }
+ });</pre>
+<p>
+Now a template specified as:
+</p>
+<pre> [% tt_start_tag %] INCLUDE foo [% tt_end_tag %]</pre>
+<p>
+will be served by the 'file' provider (the default). Otherwise you
+can explicitly add a prefix:
+</p>
+<pre> [% tt_start_tag %] INCLUDE file:foo.html [% tt_end_tag %]
+ [% tt_start_tag %] INCLUDE http:foo.html [% tt_end_tag %]
+ [% tt_start_tag %] INCLUDE http://www.xyz.com/tt2/header.tt2 [% tt_end_tag %]</pre>
+<p>
+This same principal can be used to create a DBI template provider. e.g.
+</p>
+<pre> [% tt_start_tag %] INCLUDE dbi:foo.html [% tt_end_tag %]</pre>
+<p>
+But similarly, alas, we don't yet have a DBI provider as part of the
+Template Toolkit. There has been some talk on the mailing list about
+efforts to develop DBI and/or HTTP providers but as yet no-one has
+stepped forward to take up the challenge...
+</p>
+<p>
+In the mean time, Craig's post from the mailing list has some useful
+pointers on how to acheive this using existing modules:
+</p>
+<pre> To: Adam Theo &lt;adamtheo@theoretic.com&gt;
+ From: Craig Barratt &lt;craig@arraycomm.com&gt;
+ Date: Fri, 18 May 2001 17:06:59 -0700
+
+ &gt; i was wondering if there is anyway to fetch a file using http:// or
+ &gt; ftp:// and include that?
+
+ Here's one way. Set the LOAD_PERL option:
+
+ use Template;
+
+ my $template = Template-&gt;new({
+ LOAD_PERL =&gt; 1
+ });
+ $template-&gt;process(&quot;example.tt&quot;, { stdout =&gt; *STDOUT })
+ || die $template-&gt;error();
+
+ and then use LWP::UserAgent and HTTP::Request:
+
+ [% tt_start_tag %]
+ USE ua = LWP.UserAgent;
+ ua.proxy(&quot;http&quot;, &quot;http://your_proxy/&quot;);
+ USE req = HTTP.Request(&quot;GET&quot;, &quot;http://www.cpan.org&quot;);
+ ua.request(req).content;
+ -[% tt_end_tag %]
+
+ For FTP use Net::FTP:
+
+ [% tt_start_tag %]
+ USE ftp = Net.FTP(&quot;ftp.cpan.org&quot;);
+ x = ftp.login(&quot;anonymous&quot;, &quot;me@here.there&quot;);
+ x = ftp.cwd(&quot;/&quot;);
+ x = ftp.get(&quot;welcome.msg&quot;, stdout);
+ x = ftp.quit;
+ -[% tt_end_tag %]
+
+ Normally ftp.get would write the file into the current directory.
+ Instead we pass stdout as a second argument so that it is written
+ to stdout. We set stdout to STDOUT in the variables we pass to
+ process.
+
+ Craig</pre>
+[%- END %]
+[% WRAPPER subsection
+ title = "Miscellaneous"
-%]
<ul>
@@ -114,13 +192,11 @@
No, I think you've hhhaadd ennnough alllrready.
</p>
-
</ul>
-
[%- END %]
[%- END %]
[% WRAPPER section
- title='AUTHOR'
+ title="AUTHOR"
-%]<p>
Andy Wardley &lt;abw@kfs.org&gt;
</p>
@@ -129,14 +205,14 @@
</p>
[%- END %]
[% WRAPPER section
- title='VERSION'
+ title="VERSION"
-%]<p>
-2.07, distributed as part of the
-Template Toolkit version 2.02, released on 06 April 2001.
+2.09, distributed as part of the
+Template Toolkit version 2.03, released on 14 June 2001.
</p>
[%- END %]
[% WRAPPER section
- title='COPYRIGHT'
+ title="COPYRIGHT"
-%]<pre> Copyright (C) 1996-2001 Andy Wardley. All Rights Reserved.
Copyright (C) 1998-2001 Canon Research Centre Europe Ltd.</pre>
<p>
View
57 docs/src/Library/HTML.html
@@ -12,17 +12,17 @@
page = 'HTML'
%]
[% WRAPPER toc;
- INCLUDE tocitem title='DESCRIPTION'
- subs=['Headers, Footers and Pages', 'Tables, Bars and Boxes'];
- INCLUDE tocitem title='AUTHOR';
- INCLUDE tocitem title='VERSION';
- INCLUDE tocitem title='COPYRIGHT';
- INCLUDE tocitem title='SEE ALSO';
+ INCLUDE tocitem title="DESCRIPTION"
+ subs=["Headers, Footers and Pages", "Tables, Bars and Boxes"];
+ INCLUDE tocitem title="AUTHOR";
+ INCLUDE tocitem title="VERSION";
+ INCLUDE tocitem title="COPYRIGHT";
+ INCLUDE tocitem title="SEE ALSO";
END
%]
<!-- Pod to HTML conversion by the Template Toolkit version 2 -->
[% WRAPPER section
- title='DESCRIPTION'
+ title="DESCRIPTION"
-%]<p>
<b>NOTE:</b> This documentation is incomplete and may be incorrect
in places.
@@ -76,7 +76,7 @@
directory for further examples and enlightenment on using this library.
</p>
[% WRAPPER subsection
- title = 'Headers, Footers and Pages'
+ title = "Headers, Footers and Pages"
-%]
<ul>
@@ -105,7 +105,6 @@
[% tt_end_tag %]</pre>
-
<li><b>footer</b><br>
<p>
The 'footer' element generates the terminating &lt;/body&gt; and
@@ -116,7 +115,6 @@
<pre> [% tt_start_tag %] PROCESS html/footer [% tt_end_tag %]</pre>
-
<li><b>page</b><br>
<p>
The 'page' element combines the 'html/header' and 'html/footer' elements.
@@ -134,12 +132,10 @@
<pre> ...page content here...</pre>
<pre> [% tt_start_tag %] END [% tt_end_tag %]</pre>
-
</ul>
-
[%- END %]
[% WRAPPER subsection
- title = 'Tables, Bars and Boxes'
+ title = "Tables, Bars and Boxes"
-%]
<ul>
@@ -164,46 +160,38 @@
</p>
-
<li><b>col</b><br>
<p>
Set the background colour (default: none).
</p>
-
<li><b>width</b><br>
<p>
Set a fixed table width.
</p>
-
<li><b>pad</b><br>
<p>
Set the cellpadding.
</p>
-
<li><b>space</b><br>
<p>
Set the cellspacing.
</p>
-
<li><b>content</b><br>
<p>
Content for the box. Supplied automatically if used via WRAPPER.
</p>
-
</ul>
-
-
<li><b>row</b><br>
<p>
A basic element for creating HTML table rows.
@@ -225,32 +213,26 @@
</p>
-
<li><b>valign</b><br>
<p>
Set the vertical alignment.
</p>
-
<li><b>rowspan</b><br>
<p>
Specify the number of rows to span.
</p>
-
<li><b>content</b><br>
<p>
Content for the box. Supplied automatically if used via WRAPPER.
</p>
-
</ul>
-
-
<li><b>cell</b><br>
<p>
A basic element for creating HTML table cells.
@@ -273,32 +255,26 @@
</p>
-
<li><b>align</b><br>
<p>
Set the horizontal alignment.
</p>
-
<li><b>colspan</b><br>
<p>
Specify the number of columns to span.
</p>
-
<li><b>content</b><br>
<p>
Content for the cell. Supplied automatically if used via WRAPPER.
</p>
-
</ul>
-
-
<li><b>bar</b><br>
<p>
The bar element is a wrapping of html/table + html/row.
@@ -308,7 +284,6 @@
[% tt_start_tag %] END [% tt_end_tag %]</pre>
-
<li><b>box</b><br>
<p>
The box element is a wrapping of html/table + html/row + html/cell
@@ -317,13 +292,11 @@
Hello World!
[% tt_start_tag %] END [% tt_end_tag %]</pre>
-
</ul>
-
[%- END %]
[%- END %]
[% WRAPPER section
- title='AUTHOR'
+ title="AUTHOR"
-%]<p>
Andy Wardley &lt;abw@kfs.org&gt;
</p>
@@ -332,14 +305,14 @@
</p>
[%- END %]
[% WRAPPER section
- title='VERSION'
+ title="VERSION"
-%]<p>
-2.07, distributed as part of the
-Template Toolkit version 2.02, released on 06 April 2001.
+2.09, distributed as part of the
+Template Toolkit version 2.03, released on 14 June 2001.
</p>
[%- END %]
[% WRAPPER section
- title='COPYRIGHT'
+ title="COPYRIGHT"
-%]<pre> Copyright (C) 1996-2001 Andy Wardley. All Rights Reserved.
Copyright (C) 1998-2001 Canon Research Centre Europe Ltd.</pre>
<p>
@@ -348,7 +321,7 @@
</p>
[%- END %]
[% WRAPPER section
- title='SEE ALSO'
+ title="SEE ALSO"
-%]<p>
[% ttlink('Template::Library::Splash', 'Template::Library::Splash') -%]
</p>
View
20 docs/src/Library/PostScript.html
@@ -12,23 +12,23 @@
page = 'PostScript'
%]
[% WRAPPER toc;
- INCLUDE tocitem title='DESCRIPTION';
- INCLUDE tocitem title='AUTHOR';
- INCLUDE tocitem title='VERSION';
- INCLUDE tocitem title='COPYRIGHT';
+ INCLUDE tocitem title="DESCRIPTION";
+ INCLUDE tocitem title="AUTHOR";
+ INCLUDE tocitem title="VERSION";
+ INCLUDE tocitem title="COPYRIGHT";
END
%]
<!-- Pod to HTML conversion by the Template Toolkit version 2 -->
[% WRAPPER section
- title='DESCRIPTION'
+ title="DESCRIPTION"
-%]<p>
The PostScript library contains a number of templates for generating
PostScript pages. It's very new, very incomplete, very ad-hoc and
isn't yet documented.
</p>
[%- END %]
[% WRAPPER section
- title='AUTHOR'
+ title="AUTHOR"
-%]<p>
Andy Wardley &lt;abw@kfs.org&gt;
</p>
@@ -37,14 +37,14 @@
</p>
[%- END %]
[% WRAPPER section
- title='VERSION'
+ title="VERSION"
-%]<p>
-2.07, distributed as part of the
-Template Toolkit version 2.02, released on 06 April 2001.
+2.09, distributed as part of the
+Template Toolkit version 2.03, released on 14 June 2001.
</p>
[%- END %]
[% WRAPPER section
- title='COPYRIGHT'
+ title="COPYRIGHT"
-%]<pre> Copyright (C) 1996-2001 Andy Wardley. All Rights Reserved.
Copyright (C) 1998-2001 Canon Research Centre Europe Ltd.</pre>
<p>
View
353 docs/src/Library/Splash.html
@@ -12,28 +12,28 @@
page = 'Splash'
%]
[% WRAPPER toc;
- INCLUDE tocitem title='DESCRIPTION'
- subs=['Introduction', 'Configuration', 'Colours', 'Style'];
- INCLUDE tocitem title='COMPONENT TEMPLATES'
- subs=['splash/text', 'splash/table', 'splash/row', 'splash/cell', 'splash/box', 'splash/button', 'splash/bar', 'splash/menu', 'splash/menubar', 'splash/panel', 'splash/pane', 'splash/tab', 'splash/tabset', 'splash/tabbox', 'splash/tabsbox', 'splash/tabspanel'];
- INCLUDE tocitem title='EXAMPLES';
- INCLUDE tocitem title='AUTHOR';
- INCLUDE tocitem title='VERSION';
- INCLUDE tocitem title='COPYRIGHT';
- INCLUDE tocitem title='SEE ALSO';
+ INCLUDE tocitem title="DESCRIPTION"
+ subs=["Introduction", "Configuration", "Colours", "Style"];
+ INCLUDE tocitem title="COMPONENT TEMPLATES"
+ subs=["splash/text", "splash/table", "splash/row", "splash/cell", "splash/box", "splash/button", "splash/bar", "splash/hair", "splash/menu", "splash/menubar", "splash/panel", "splash/pane", "splash/tab", "splash/tabset", "splash/tabbox", "splash/tabsbox", "splash/tabspanel"];
+ INCLUDE tocitem title="EXAMPLES";
+ INCLUDE tocitem title="AUTHOR";
+ INCLUDE tocitem title="VERSION";
+ INCLUDE tocitem title="COPYRIGHT";
+ INCLUDE tocitem title="SEE ALSO";
END
%]
<!-- Pod to HTML conversion by the Template Toolkit version 2 -->
[% WRAPPER section
- title='DESCRIPTION'
+ title="DESCRIPTION"
-%]<p>
<b>NOTE:</b> This documentation is incomplete, incorrect and outdated.
The Splash! library is still evolving and subject to change. See
the examples for a much more recent and accurate demonstration of
use.
</p>
[% WRAPPER subsection
- title = 'Introduction'
+ title = "Introduction"
-%]<p>
The 'Splash' template library is distributed as part of the Template
Toolkit. It can be found in the 'templates' sub-directory of the
@@ -83,7 +83,7 @@
<pre> [% tt_start_tag %] INCLUDE html/something [% tt_end_tag %].</pre>
[%- END %]
[% WRAPPER subsection
- title = 'Configuration'
+ title = "Configuration"
-%]<p>
The 'splash/config' template defines a 'splash' hash array which
contains numerous configuration items for the Splash library. You
@@ -129,7 +129,7 @@
</p>
[%- END %]
[% WRAPPER subsection
- title = 'Colours'
+ title = "Colours"
-%]<p>
The Splash! library uses the colours defined in the html/rgb template.
The 'rgb' hash defined therein is imported as the 'splash.rgb' hash.
@@ -140,7 +140,7 @@
</p>
[%- END %]
[% WRAPPER subsection
- title = 'Style'
+ title = "Style"
-%]<p>
There are two very primitive &quot;styles&quot; implemented called &quot;select&quot; and
&quot;unselect&quot;. These are used to indicate which item on a menu is
@@ -177,15 +177,15 @@
[%- END %]
[%- END %]
[% WRAPPER section
- title='COMPONENT TEMPLATES'
+ title="COMPONENT TEMPLATES"
-%]<p>
This section describes some of the component templates in the Splash!
library. This documentation is incomplete and may also be inaccurate
in places. The examples in the 'examples' directory are likely to be
a much better reference.
</p>
[% WRAPPER subsection
- title = 'splash/text'
+ title = "splash/text"
-%]<p>
Simple template to format text according to a selected/unselected style,
adding links, etc.
@@ -208,60 +208,42 @@
</p>
-
<li><b>link</b><br>
<p>
URL which can be defined to make the text a link.
</p>
-
<li><b>style</b><br>
<p>
Reference to a style hash.
</p>
-
<li><b>select</b><br>
<p>
Flag to default the style to splash.select (select == true value) or
splash.unselect (select == false value).
</p>
-
</ul>
-
<p>
The following items default to the relevant style values:
</p>
<ul>
-<li><b>col (style.col.text)</b><br>
-
-
-
-
-<li><b>font (style.font.face)</b><br>
-
-
-
-
-<li><b>bold (style.font.bold)</b><br>
-
-
-
-
-<li><b>size (style.font.size)</b><br>
+<li><b>col (style.col.text)</b>
+<li><b>font (style.font.face)</b>
+<li><b>bold (style.font.bold)</b>
+<li><b>size (style.font.size)</b>
</ul>
-
[%- END %]
[% WRAPPER subsection
- title = 'splash/table'
+ title = "splash/table"
-%]<p>
A thin wrapper around html/table, allowing a colour to be specified
by name.
@@ -288,46 +270,39 @@
</p>
-
<li><b>col</b><br>
<p>
Background colour.
</p>
-
<li><b>border</b><br>
<p>
Border width (default: 0)
</p>
-
<li><b>width</b><br>
<p>
Width in absolute pixels (e.g. '100') or as a percentage (e.g. '50%').
</p>
-
<li><b>pad</b><br>
<p>
Cell padding.
</p>
-
<li><b>space</b><br>
<p>
Cell padding.
</p>
-
</ul>
-
[%- END %]
[% WRAPPER subsection
- title = 'splash/row'
+ title = "splash/row"
-%]<p>
Creates a row for an HTML table.
</p>
@@ -351,32 +326,27 @@
</p>
-
<li><b>col</b><br>
<p>