Debian Codegraph @

Changes

raw
1 Revision history for CGI-Application-Plugin-AnyTemplate
2
3 0.18 Oct 18, 2009
4 - Can now use Clone::PP if Clone is not installed.
5 Thanks to Bianka Martinovic (RT #37999). Note that there
6 doesn't appear to be a way to indicate to Module::Build that
7 the module can use either Clone or Clone::PP - that it
8 requires one (but not both) of them. So for now, Clone is
9 still listed as a prerequisite.
10
11 - updated Template::Toolkit driver docs to indicate how to use
12 different encodings. Thanks to Shmuel Fomberg (RT #34791).
13
14 - removed spurious call to $template->error on Petal templates.
15 Thanks to William McKee (RT #20221).
16
17 - Component handler now weakens reference to containing_template,
18 in an attempt to avoid crazy memory usage. Thanks to Dan Horne
19 (RT #18157).
20
21 - Changes of interest to module maintainers only:
22 - t/prereqs-scenarios is now included in the distribution.
23
24 This is how I simulate the absense of specific modules when
25 running the test suite. For instance, the user may have
26 HTML::Template::Expr installed, but not HTML::Template::Pluggable.
27 Or they may have Clone::PP installed, but not Clone.
28
29 To test the various prerequisite scenarios, use the included
30 prove-prereqs.pl script:
31
32 ./misc/prove-prereqs.pl t/prereq_scenarios -Ilib t/
33
34 This runs the test suite several times. Each time it simulates
35 a different set of unavailable modules.
36
37 Adapted from the Perl Hacks book.
38
39 - fixed the makedocs script to work with more recent pod2html
40
41 - changed noindex to no_index in META.yml
42
43 0.17 Nov 07, 2005
44 - fixed storage of TT objects so that objects with different
45 named configs don't trample each other (discovered by RA Jones)
46
47 0.16 Nov 03, 2005
48 - fixed fill() so that when it is called without parameters, it
49 does not set the filename to undef.
50 - changed skip_libs to prereq_scenarios (and removed the scenarios
51 from the distribution)
52 - added new scenario for old CAP::Forward
53
54 0.15 Oct 03, 2005
55 - include fix to work with old version of CAP::Forward that
56 doesn't always install its hooks properly.
57
58 0.14 Sep 25, 2005
59 - added template_filename_generator
60 - minor doc fix
61
62 0.13 Sep 14, 2005
63 - fixd bug where clear_params didn't work (Wojciech Pietron)
64 - fixed typos in docs regarding include_paths and
65 add_include_paths (Wojciech Pietron)
66 - minor doc fix
67
68 0.12 Sep 13, 2005
69 - added return_references option, defaulting to true.
70 - changed load_tmpl to always return a string, rather than a
71 reference
72 - added documentation indicating that output returns a reference
73 by default
74
75 0.11 Sep 08, 2005
76 - fixed a bug fill/process when called with a single non-hashref
77 argument. The following used to be broken; now they DWIM:
78
79 $self->template->fill('filename');
80 $self->template->fill(\$template);
81
82 - fixed a bug in template_post_process that has been there since
83 the beginning. The callback was being called as:
84
85 template_post_process($self, \$output) # wrong!
86
87 But it was documented as:
88
89 template_post_process($self, $template, \$output) # right!
90
91 It's been fixed to match the documentation.
92
93 0.10 Aug 17, 2005
94 - This is a major new release with a lot of new features and
95 some incompatible API changes.
96
97 The new features are:
98
99 * new driver (HTMLTemplatePluggable) has support for
100 HTML::Template::Pluggable and HTML::Template::Plugin::Dot
101
102 * AnyTemplate can now optionally provide a load_tmpl method
103 like the one built into CGI::Application, so that old code
104 can get the benefit of AnyTemplate.
105
106 * added support for the load_tmpl hook
107
108 * test suite should be less fragile for users who don't have
109 all of the templating modules installed
110
111 The incompatibilities are:
112
113 * associate_query off by default
114 * associate_query now deprecated
115 * CAP::Forward now required
116 * default template names determined from $self->current_runmode, not
117 from the name of the calling sub
118 * template_pre_process and template_post_process now need to be
119 explicitly registered with $self->add_callback()
120 * tmpl_path is respected
121
122 - for more info on these changes see the changelog below for the developer
123 versions released since 0.08
124
125 0.10_06 Aug 17, 2005 [**DEVELOPER RELEASE**] [unreleased]
126 - added an explit test to see if HTML::Template::Plugin::Dot works
127
128 0.10_05 Aug 13, 2005 [**DEVELOPER RELEASE**]
129 - fixed a bug in the tests for testing module prerequisites
130 - it is now possible to run the test suite while simulating the
131 absense of specific templating modules. To run the test suite
132 multiple times (each with a different selection of absent
133 modules), run:
134
135 $ perl misc/prove_without_modules.pl t/*.t
136
137 To customize this process, see the instructions at the top of
138 misc/prove_without_modules.pl
139
140 0.10_04 Aug 13, 2005 [**DEVELOPER RELEASE**]
141 - new driver HTMLTemplatePluggable has support for
142 HTML::Template::Pluggable and HTML::Template::Plugin::Dot
143 (thanks to Mark Stosberg for starting the driver)
144
145 0.10_03 July 27, 2005 [**DEVELOPER RELEASE**]
146 - moved 'forward' to its own module: CGI::Application::Plugin::Forward
147 - changed instances of 'use base' to use... and @ISA to be kinder to old Perls
148 - made hook-based tests skip if installed CGI::Application
149 doesn't support hooks
150
151 0.10_02 July 25, 2005 [**DEVELOPER RELEASE**]
152 - wrapped usage of CGI::Application's callback system in
153
154 if ($webapp->can('call_hook')) { ... }
155
156 ...or equivalent, so CGI::Application 4.x is not required.
157
158 0.10_01 July 25, 2005 [**DEVELOPER RELEASE**]
159 - this version has several API changes that are not backwards compatible:
160
161 - template names used to be automatically determined from the name
162 of the calling subroutine:
163
164 sub my_runmode {
165 my $self = shift;
166 $self->other_method;
167 }
168 sub other_method {
169 my $self = shift;
170 $self->template->fill; # loads 'other_method.html'
171 }
172
173 There were two problems with this method:
174 1. Not every subroutine or method is a run mode
175 2. Under debuggers, the name of the calling subroutine is
176 often not available, so code that uses automatic
177 template names can't be run under a debugger.
178
179 So now AnyTemplate has been changed to get the template name
180 from $self->get_current_runmode:
181
182 sub my_runmode {
183 my $self = shift;
184 $self->other_method;
185 }
186 sub other_method {
187 my $self = shift;
188 $self->template->fill; # loads 'my_runmode.html'
189 }
190
191 If you want to pass control to another runmode and you want
192 $self->get_current_runmode to be updated, then you use the
193 new 'forward' method:
194
195 sub my_runmode {
196 my $self = shift;
197 return $self->forward('other_runmode');
198 }
199 sub other_runmode {
200 my $self = shift;
201 $self->template->fill; # loads 'other_runmode.html'
202 }
203
204
205 - template_pre_process and template_post_process are no longer
206 called automatically. Instead you must register them as
207 hooks.
208
209 $self->add_callback('template_pre_process', \&template_pre_process);
210 $self->add_callback('template_post_process', \&template_post_process);
211
212 - associate_query and emulate_associate_query have now been
213 disabled by default. Having this feature enabled by default
214 was a potential XSS (Cross Site Scripting) security risk.
215 The use of this feature is now deprecated. The feature
216 will be removed in the future
217
218
219 - other changes:
220 - added option to override load_tmpl. It is enabled by:
221
222 use CGI::Application::Plugin::AnyTemplate qw(load_tmpl);
223
224 When this feature is enabled, you can do the following:
225
226 $self->load_tmpl('somefile.txt',
227 path => '/path/to/templates',
228 %other_options
229 );
230
231 And this is translated into:
232
233 $self->template->load('somefile.txt',
234 add_include_path => '/path/to/templates',
235 HTMLTemplate => \%other_options,
236 auto_add_template_extension => 0,
237 );
238
239 - added support for the load_tmpl hook, compatible with the
240 one built into CGI::Application
241
242 - $self->tmpl_path is now merged into 'include_path'
243
244 - documentation for authors of plugins and re-usable applications
245
246 - documentation for why the automatic extension mechanism is there
247
248 - re-numbered some test scripts
249
250
251 0.08 July 20, 2005
252 - fixed bug where keys of configuration hashref were clobbered,
253 so if you used the same config repeatedly (e.g. under
254 mod_perl), onlyt the first call would work.
255 (thanks to R.A. Jones)
256
257 0.07 July 10, 2005
258 - templates can also be created from strings via fill:
259 return $self->template->fill(\$some_text, \%params);
260
261 0.06 July 10, 2005
262 - allowed templates to be created from strings (works in all
263 drivers except Petal):
264
265 $self->template->load(string => \$some_text);
266 $self->template->load(\$some_text);
267
268
269 0.05 Jun 15, 2005
270 - changed embedded components from 'dispatch' to 'embed' to
271 avoid confusion with CGI::Application::Dispatch
272
273 This is an incompatible API change, which hopefully won't
274 actually affect anybody since I don't think there are any
275 users of AnyTemplate yet.
276
277 The default syntax has changed from:
278 CGIAPP_dispatch, CGIAPP.dispatch, CGIAPP/dispatch, etc.
279 to:
280 CGIAPP_embed, CGIAPP.embed, CGIAPP/embed, etc.
281
282 The old syntax still works to embed components in TT and
283 Petal (but is undocumented). Users of HTML::Template and
284 HTML::Template::Expr can return to the old syntax by setting
285 embed_tag_name to 'cgiapp_dispatch'
286
287 Related API changes:
288 - CAP:AnyTemplate::Dispatcher has been renamed to
289 CAP:AnyTemplate::ComponentHandler
290
291 - the dispatcher_class option has been renamed to
292 component_handler class
293
294 - the dispatch_tag_name driver config key has been renamed to
295 embed_tag_name
296
297
298 0.04 May 19, 2005
299 - fixed Pod links and other minor doc issues
300
301 0.03 May 19, 2005
302 - Fixed one More POD NAME error
303
304 0.02 May 19, 2005
305 - Fixed NAME sections in driver POD
306
307 0.01 May 18, 2005
308 - Initial Release