• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

t/H28-Jun-1999-262187

templates/H28-Jun-1999-53

FastTemplate.pmH A D28-Jun-199930.5 KiB1,164282

MANIFESTH A D28-Jun-1999163 1211

Makefile.PLH A D26-Jun-1999248 85

READMEH A D28-Jun-19995.3 KiB198123

README

1
2README for the Perl Module CGI::FastTemplate - 1.09
3
4	Copyright (c) 1998-1999 Jason Moore <jmoore@sober.com>.  All rights
5	reserved.
6
7	This program is free software; you can redistribute it and/or
8	modify it under the same terms as Perl itself.
9
10	This program is distributed in the hope that it will be useful,
11	but WITHOUT ANY WARRANTY; without even the implied warranty of
12	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13	Artistic License for more details.
14
15
16DESCRIPTION
17-----------
18
19CGI::FastTemplate manages templates and parses templates replacing
20variable names with values.  It was designed for mid to large scale web
21applications (CGI, mod_perl) where there are great benefits to separating
22the logic of an application from the specific implementation details.
23
24For example using FastTemplate it is possible to:
25
26	- build multilingual applications
27
28	- allow users to select high-bandwidth or text-only versions of
29	  an application
30
31	- let graphic designers work on templates independantly of
32	  the programmers
33
34	- share the responsibility of interface design
35
36CGI::FastTemplate has the following attributes:
37
38       Speed
39
40       FastTemplate doesn't use eval, and parses with a single
41       regular expression.  It just does simple variable
42       interpolation (i.e. there is no logic that you can add to
43       templates - you keep the logic in the code).  That's why
44       it's has 'Fast' in it's name!
45
46       Efficiency
47
48       FastTemplate functions accept and return references
49       whenever possible, which saves needless copying of
50       arguments (hashes, scalars, etc).
51
52       Flexibility
53
54       The API is robust and flexible, and allows you to build
55       very complex HTML documents or HTML interfaces.  It is
56       100% perl and works on Unix or NT.  Also, it isn't
57       restricted to building HTML documents -- it could be used
58       to build any ascii based document (e.g. postscript, XML,
59       email).
60
61
62For more information see the pod documentation included in the file
63'FastTemplate.pm'.
64
65
66INSTALLATION
67------------
68
69To install, unzip and untar the archive. In the directory created type:
70
71	perl Makefile.PL
72	make
73	make install
74
75Note: If this does not work, you can always just copy the file
76'FastTemplate.pm' to the 'CGI' directory in your perl distribution.
77
78If you want to test out the module without installing it, you can add
79the following to your code:
80
81	BEGIN
82	{
83		unshift(@INC, "/wherever/you/put/CGI-FastTemplate/");
84	}
85
86	use CGI::FastTemplate;
87
88
89DOCUMENTATION
90-------------
91
92Documentation is included in the module in pod format.  Once
93CGI::FastTemplate has been installed type:
94
95	perldoc CGI::FastTemplate
96
97or if is uninstalled:
98
99	perldoc ./FastTemplate.pm
100
101For more information on perldoc type 'perldoc perldoc'.
102
103
104AUTHOR
105------
106
107Jason Moore <jmoore@sober.com>
108
109Feel free to send along any comments, suggestions, or bug reports.
110
111
112CHANGES
113-------
114
115Revision history for Perl extension CGI::FastTemplate.
116
1171.09 Sun Jun 27 23:40:14 EDT 1999
118
119    - object is now uses array ref, not a hash ref to store attributes
120    Thanks to: Greg Bacon from his talk "Building Objects out of Arrays" at YAPC
121    note: the API is the same -- this is a behind-the-scenes implementation change.
122
123	- minor pod doco edits
124	- added test scripts and 2 test templates
125
1261.08 Sun Jan 24 23:14:03 EST 1999
127
128	- minor pod doco edits
129	- added GNU copyright
130	- 'Changes' file no longer in distribution. See: 'README'
131
1321.07  Sun Jan 24 23:14:03 EST 1999
133
134	- edited main regexp to add support for new ${VAR} style variables.
135	Thanks to: Eric L. Brine <q2ir@unb.ca>
136	- minor pod doco edits
137
138
1391.06  Mon Jan  4 13:47:13 EST 1999
140
141	- extended clear_tpl() to allow for a selective clearing of loaded templates.
142	Useful for persistant or long running code where you want to use a large
143	template, but don't want to keep it in memory.
144
145	clear_tpl()         - clears all loaded templates from cache
146	clear_tpl(SCALAR)   - clears only template SCALAR
147	clear_tpl(ARRAY)    - clears templates named in ARRAY
148
149
1501.05  Fri Nov 27 15:27:54 EST 1998
151	- extended clear_parse() (alias: clear()) to handle array as well as
152	a scalar.   e.g. $tpl->clear("ROWS") or $tpl->clear("ROWS", "COLS", "HEAD");
153	are valid.
154
155
1561.04  Thu Oct 29 09:57:15 EST 1998
157	- strict() now leaves unknown variables in the final doc instead of
158	converting them to an empty string.  see: no_strict() to get the old
159	behavior back.
160
161
1621.03  Thu Oct 15 10:42:14 EDT 1998
163	- minor change to prevent spurious warnings under -w (e.g. {strict}
164	becomes {"strict"})
165
166
1671.02  Tue Sep 22 08:57:29 EDT 1998
168
169	- fixed bug that allowed first character after '$' to be a digit.
170	Variables are now: $[A-Z][A-Z0-9_]+
171	Thanks to: Benjamin Low <b.d.low@unsw.edu.au>
172
173	- add strict() no_strict() which turns on/off complaints to STDERR
174	when a variable is found but no value found for it.
175
176
1771.01  Tue Sep 15 10:01:44 EDT 1998
178
179	- added clear(SCALAR) which clears the scalar from the parsed
180	hash. i.e.
181		$tpl->clear("FOO");	## equivalent to:
182		$tpl->assign(FOO=>"");
183
184	- made $v='' not undef in parse() to avoid spurious warnings
185	Thanks to: Benjamin Low <b.d.low@unsw.edu.au>
186
187	- added method define_nofile() (alias: define_raw) which allows
188	you to define a template without having to create a separate file
189	for your template.
190
191
1921.00  Thu Aug 20 11:59:22 1998
193	- original version; created by h2xs 1.18
194	- first public release (rewrite)
195
196
197
198