html-template-users Mailing List for HTML::Template (Page 46)
Brought to you by:
samtregar
You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(42) |
Jul
(80) |
Aug
(77) |
Sep
(97) |
Oct
(65) |
Nov
(80) |
Dec
(39) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(63) |
Feb
(47) |
Mar
(45) |
Apr
(63) |
May
(67) |
Jun
(51) |
Jul
(78) |
Aug
(37) |
Sep
(45) |
Oct
(59) |
Nov
(50) |
Dec
(70) |
2004 |
Jan
(23) |
Feb
(90) |
Mar
(37) |
Apr
(53) |
May
(111) |
Jun
(71) |
Jul
(35) |
Aug
(58) |
Sep
(35) |
Oct
(35) |
Nov
(35) |
Dec
(20) |
2005 |
Jan
(51) |
Feb
(19) |
Mar
(20) |
Apr
(8) |
May
(26) |
Jun
(14) |
Jul
(49) |
Aug
(24) |
Sep
(20) |
Oct
(49) |
Nov
(17) |
Dec
(53) |
2006 |
Jan
(12) |
Feb
(26) |
Mar
(45) |
Apr
(19) |
May
(19) |
Jun
(13) |
Jul
(11) |
Aug
(9) |
Sep
(10) |
Oct
(16) |
Nov
(17) |
Dec
(13) |
2007 |
Jan
(9) |
Feb
(12) |
Mar
(28) |
Apr
(33) |
May
(12) |
Jun
(12) |
Jul
(19) |
Aug
(4) |
Sep
(4) |
Oct
(5) |
Nov
(5) |
Dec
(13) |
2008 |
Jan
(6) |
Feb
(7) |
Mar
(14) |
Apr
(16) |
May
(3) |
Jun
(1) |
Jul
(12) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
(9) |
2009 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(1) |
May
|
Jun
(6) |
Jul
(5) |
Aug
(3) |
Sep
(7) |
Oct
(1) |
Nov
(15) |
Dec
(1) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
(9) |
May
|
Jun
|
Jul
(5) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
(3) |
Mar
|
Apr
(28) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(3) |
Oct
|
Nov
(8) |
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
(2) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Nishikant K. <nk...@we...> - 2004-07-10 13:23:28
|
Hello List, my $template = HTML::Template->new(filename => 'my.tmpl'); When 'my.tmpl' is not found, the cgi script dies with following message in the error_log: HTML::Template->new() : Cannot open included file /var/www/html/nkDir/my.tmpl : file not found. at /usr/lib/perl5/site_perl/5.6.1/HTML/Template.pm line 1580 HTML::Template::_init_template('HTML::Template=HASH(0x809dbe8)') called at /usr/lib/perl5/site_perl/5.6.1/HTML/Template.pm line 1177 HTML::Template::_init('HTML::Template=HASH(0x809dbe8)') called at /usr/lib/perl5/site_perl/5.6.1/HTML/Template.pm line 1071 main::showHome('HASH(0x804b5a4)', 'HASH(0x854f3b0)', '') called at /var/www/cgi-bin/nkDir/home.cgi line 71 [Sat Jul 10 08:12:59 2004] [error] [client 127.0.0.1] Premature end of script headers: /var/www/cgi-bin/nkDir/home.cgi I would like to catch this error and do a graceful exit by displaying "'my.tmpl' not found!" message back to user. One way I can think of is to 'stat my.tmpl' before calling new(), but just wanted to check if there are better ways. Thanks Nishi |
From: David W. <da...@ki...> - 2004-07-08 23:24:37
|
The Bricolage development team is pleased to announce the release of Bricolage 1.8.1. This maintenance release address a number of issues in Bricolage 1.8.0. Here are the highlights: Improvements * More complete Traditional Chinese and Simplified Chinese localizations. Also, the Mandarin localization now simply inherits from the Traditional Chinese localization. * make clone now copies the lib directory and all of the bin scripts from the target to the clone, rather than from the sources. This allows any changes that have been made to scripts and classes to be properly cloned. * When installing Bricolage, it will now allow you to proceed if the database already exists by asking if you want to create the Bricolage tables in the existing database. Suggested by Mark Fournier and Marshall Roch. * The installer is now a bit smarter in how it handles loading the log_config (or config_log, as the case may be) module. * Added language-specific style sheets. This is especially useful for right-to-left languages or for languages that require special fonts. * The "New Alias" search interface now displays thumbnails when searching for media documents to alias and the USE_THUMBNAILS bricolage.conf directive is enabled. * Aliases can now be made to documents within the same site. * The SOAP interface for importing and exporting elements now properly has "key_name" XML elements instead of "name" XML elements. The changes are backwards compatible with XML exported from Bricolage 1.8.0 servers, however. * Added move() method to the virtual FTP interface. This means that to deploy a template, rather than having to rename it locally to append ".deploy", one can simply move in FTP to its new name with ".deploy" on appended to the new name. * Document expirations are now somewhat more intelligent. Rather than just scheduling an expiration job only if there is an expiration date the first time a document is published, Bricolage will now always schedule an expiration job for a document provided that one does not already exist (scheduled or completed) for the same time and for one of the file resources for the document. This should allow people to more easily and arbitrarily expire content whenever necessary. * Burner notes now persist for all sub burns (triggered by publish_another() and preview_another() in a single burn. * Added ability to create and manage groups of objects for several different types of objects. Also added the ability manage group membership within the administrative profiles for those objects. This change makes it possible to give users permission to administer subsets of objects. The new groupable objects are: Preferences Groups Alert Types Element Types Keywords Contributors * Alert rules are now evaluated within a safe compartment (using Safe.pm) to prevent security exploits. * The Bulk Publish admin tool is no longer limited to use only by members of the Global Admins group. Now anyone can use it. All one needs is READ permission to the categories of stories, and PUBLISH permission to the stories and media documents to be published. Bug Fixes * Eliminated 'Bareword "ENABLE_HTMLAREA" not allowed while "strict subs" in use' warning that prevented startup for some installations. * Changes made to user or contributor contacts without changing any other part of the user or contributor object are now properly saved. * The upgrade to 1.8.0 now correctly updates story URIs that use the URI Suffix of an output channel instead of using the URI Prefix twice. * Aliases of Image, Audio, or Video media documents no longer remain stuck on desks. * Related media and story subelements of media documents now work properly. * Calls to preview_another() in Bric::Util::Burner will now use any templates in the current user's sandbox and properly burn them to the preview root rather than to the staging root used for publishing. * Contributor fields for roles other than the default role now properly store and retain their values. * The virtual FTP server now properly checks out templates when a template is uploaded and is already in workflow. * Uploading a non-existent template via the virtual FTP server now correctly creates a new template. The type of template depends on the name of the template being uploaded, and for element templates, on whether there is an element with the appropriate key name. The user must have CREATE permission to All Templates or to the start desk in the first template workflow in the relevant site. * Reverting a document or template to the current version number now properly reverts all changes to the time the user checked out the document or template. Reversion is also a bit more efficient in how it looks up the previous version in the database. * The SOAP server now rolls back any changes whenever an error is thrown. This prevents problems when a few objects are created or updated before an exception is thrown. Now any error will cause the entire SOAP request to fail. Thanks to Neal Sofge for the spot! For a complete list of the changes, see the release notes and changes list at Lhttp://sourceforge.net/project/shownotes.php?release_id=251820>. For the complete history of ongoing changes in Bricolage, see Bric::Changes at http://www.bricolage.cc/docs/api/current/Bric::Changes. Download Bricolage 1.8.1 now from the SourceForge download page at http://sourceforge.net/project/showfiles.php?group_id=34789, and from the Kineticode download page at http://www.kineticode.com/bricolage/index2.html. ABOUT BRICOLAGE Bricolage is a full-featured, enterprise-class content management and publishing system. It offers a browser-based interface for ease-of use, a full-fledged templating system with complete HTML::Mason, HTML::Template, and Template Toolkit support for flexibility, and many other features. It operates in an Apache/mod_perl environment and uses the PostgreSQL RDBMS for its repository. A comprehensive, actively-developed open source CMS, Bricolage was hailed as "Most Impressive" in 2002 by eWeek. Enjoy! --The Bricolage Team |
From: Sam T. <sa...@tr...> - 2004-06-28 18:52:54
|
Krang v1.020 is now available. Notable changes in this release: - Added support for Fedora Core 2. - Upgraded to HTML::Template v2.7, fixing a bug in the handling of cached templates. - More bugs are now fixed. Detailed change-log here: http://krang.sf.net/docs/changelog.html Krang is an Open Source web-publisher / content-management system designed for large-scale magazine-style websites. It is a 100% Perl application using Apache/mod_perl and MySQL, as well as numerous CPAN modules. Krang provides a powerful and easy to use story and media editing environment for magazine editors, as well as a complete template development environment for web designers. On the back-end, Perl programmers can customize Krang to control the data entered in the story editor and add code to drive the templates to build output. Krang can be enhanced with add-ons containing new skins and other new features. Krang easily handles large data sets and can manage multiple websites in a single installation. For more information about Krang, visit the Krang website: http://krang.sourceforge.net/ There you can download Krang, view screenshots, read documentation, join our mailing-lists and access the CVS tree. - the Krang team |
From: Sam T. <sa...@tr...> - 2004-06-24 22:26:10
|
HTML::Template - a Perl module to use HTML Templates CHANGES - New Feature: Added javascript escaping with ESCAPE=JS. (Craig Manley) - Bug Fix: Improved cache keying to be sensitive to options which alter the compilation of templates (path, search_path, loop_context_vars and global_vars). Calls to new() with different settings for any of these options will no longer pull incorrect cached objects. - Bug Fix: Added code to detect broken Perl 5.8.0 installs during installation (i.e. Redhat 8 and 9). - Bug Fix: Fixed parsing of ESCAPE='URL' (Paul Baker) - Bug Fix: Added check for empty filename passed to new(). - Test Fix: Migrated tests to Test::More. This will allow the easier introduction of new tests and the use of Devel::Cover. (Gabor Szabo) DESCRIPTION This module attempts to make using HTML templates simple and natural. It extends standard HTML with a few new HTML-esque tags - <TMPL_VAR>, <TMPL_LOOP>, <TMPL_INCLUDE>, <TMPL_IF>, <TMPL_ELSE> and <TMPL_UNLESS>. The file written with HTML and these new tags is called a template. It is usually saved separate from your script - possibly even created by someone else! Using this module you fill in the values for the variables, loops and branches declared in the template. This allows you to separate design - the HTML - from the data, which you generate in the Perl script. This module is licensed under the GPL. See the LICENSE section below for more details. TUTORIAL If you're new to HTML::Template, I suggest you start with the introductory article available on the HTML::Template website: http://html-template.sourceforge.net AVAILABILITY This module is available on SourceForge. Download it at: http://html-template.sourceforge.net The module is also available on CPAN. You can get it using CPAN.pm or go to: http://www.cpan.org/authors/id/S/SA/SAMTREGAR/ CONTACT INFO This module was written by Sam Tregar (sa...@tr...). You can join the HTML::Template mailing-list by visiting: http://lists.sourceforge.net/lists/listinfo/html-template-users |
From: Tam <ngo...@ya...> - 2004-06-19 12:20:42
|
hi, I made some input with image like this <span style="position: absolute; left: 200; top: 120"> <input type="image" src="images/g0.JPG" name="baseT" width="101" height="45"></span> what should I do in the CGI code if I want to add an element in to an array everytime the user click on the image? Please help me Thanks a lot --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! |
From: Gabor S. <ga...@pe...> - 2004-06-19 04:51:50
|
On Fri, 18 Jun 2004, Sam Tregar wrote: > > That's right, but I think it runs on a delayed update from the real > CVS source. yes, I got it a few hours later. > > I am using this as I had a number of cases when suddenly part of my tests > > did not run and I did not get any warning about this. > > That's very weird. Did your code die() or seg-fault or something? If > so Test::Harness should notice and produce a 'dubious' result, not an > 'ok'. I don't know any more but if I encounter the same code again, which I cannot avoid, that's work, I'll try to find it out again what was the issue. > How about no_plan all the time? I can't stand updating magic numbers. OK, I can't have it all my way after all :) > Computers are supposed to do my counting for me! Hmm, they do, but you better tell them up front how long to count :) (I know, you'll say something: till the end of the file) Gabor |
From: Sam T. <sa...@tr...> - 2004-06-18 21:23:52
|
On Fri, 18 Jun 2004, Gabor Szabo wrote: > On Fri, 18 Jun 2004, Sam Tregar wrote: > > > Alright, this sounds fine to me. I'm commiting this now. > > Oh thanks .... > Is this suposed to be the correct CVS ? > http://cvs.sourceforge.net/viewcvs.py/html-template/HTML-Template/ > > I am asking as I have just checked it out again (which took me > 30 minutes) and it does not contain the t/ directory yet. That's right, but I think it runs on a delayed update from the real CVS source. > I remember that and also that I was not convinced back then that no_plan > is a good thing. :) > Reading it again.... > Still not.:) Oh well. > I am using this as I had a number of cases when suddenly part of my tests > did not run and I did not get any warning about this. That's very weird. Did your code die() or seg-fault or something? If so Test::Harness should notice and produce a 'dubious' result, not an 'ok'. > So what do you say, would such thing work ? > - no_plan during the main development of a test suit > - plan after it. How about no_plan all the time? I can't stand updating magic numbers. Computers are supposed to do my counting for me! -sam |
From: Gabor S. <ga...@pe...> - 2004-06-18 20:42:21
|
I know I should go to sleep already, but.... Sam, could you, please setup a mailing list on source-forge where the commits of the CVS repository would go ? Having such list makes it easier to know when should I look for new things in the repo. thanks Gabor |
From: Gabor S. <ga...@pe...> - 2004-06-18 19:54:46
|
On Fri, 18 Jun 2004, Sam Tregar wrote: > Alright, this sounds fine to me. I'm commiting this now. Oh thanks .... Is this suposed to be the correct CVS ? http://cvs.sourceforge.net/viewcvs.py/html-template/HTML-Template/ I am asking as I have just checked it out again (which took me 30 minutes) and it does not contain the t/ directory yet. > > > 3) replacing the plan from 57 to 68 > > Now that we're using Test::More I'm just going to use no_plan. If > you're wondering why, check this out: > > http://use.perl.org/~samtregar/journal/15751 I remember that and also that I was not convinced back then that no_plan is a good thing. :) Reading it again.... Still not.:) The way I am using this is that during development of a certain area of the code, while I constantly change the test suit, I used no_plan and then when that area was finished and I expected not many changes in that part of the code I changed it to a planned number. I am using this as I had a number of cases when suddenly part of my tests did not run and I did not get any warning about this. Maybe there are better solutions for avoiding this, but I am not aware of them. So what do you say, would such thing work ? - no_plan during the main development of a test suit - plan after it. > > > ps. I know I am pushy. I was told so already. > > Don't let it bother you. If you're going to get through to stubborn > bastards like me you're going to have to be a little pushy! But I think of myself as a nice guy. Someone has to. Right ? Gabor |
From: Sam T. <sa...@tr...> - 2004-06-18 17:01:50
|
On Fri, 18 Jun 2004, Gabor Szabo wrote: > I mean, keep the old test suit and add a new one covering both the old > things and additional things. > > I am suggesting the following: copy the test.pl file in t/99-old.t or > some similar name and change the minimum necessary to cleanly run. Alright, this sounds fine to me. I'm commiting this now. > 3) replacing the plan from 57 to 68 Now that we're using Test::More I'm just going to use no_plan. If you're wondering why, check this out: http://use.perl.org/~samtregar/journal/15751 > ps. I know I am pushy. I was told so already. Don't let it bother you. If you're going to get through to stubborn bastards like me you're going to have to be a little pushy! Thanks, -sam |
From: Chisel W. <ch...@he...> - 2004-06-18 08:32:11
|
On Fri, Jun 18, 2004 at 09:24:01AM +0100, Chisel Wright wrote: > FYI I an such a tool. Too early, sent to wrong email alias. *DOH* -- e: ch...@he... | Get pleasure out of the little w: http://www.herlpacker.co.uk/ | things in life. Stand on an ant. gpg: D167E7FE | |
From: Chisel W. <ch...@he...> - 2004-06-18 08:24:07
|
FYI -- e: ch...@he... | Life would be so much easier if we w: http://www.herlpacker.co.uk/ | just had the source code. gpg: D167E7FE | |
From: Gabor S. <ga...@pe...> - 2004-06-18 08:10:20
|
On Thu, 17 Jun 2004, Sam Tregar wrote: > I don't think so. It's not that I mind a Test::More dependency - lots > of my modules use Test::More - but that I'm not interested in > investing the time it would take a to be sure that the new test suite > was as good as the old one. Since the tests don't have tests > themselves it's very expensive (in terms of time) to refactor them. I mean, keep the old test suit and add a new one covering both the old things and additional things. I am suggesting the following: copy the test.pl file in t/99-old.t or some similar name and change the minimum necessary to cleanly run. Then add further tests in t/01-blabla.t etc. This way you will keep the old test suit in test.pl, add an equal test suit in t/99-old.t and add even more tests in t/01.... Later, once an if you are confident with the new test suit you can remove the test.pl file but this is not necessary. I have already made this addition based on test.pl in the CVS and am I attaching the diff and the new test file for your convenience. There are only a few minor changes 1) the SKIP: label added and the block had to be turned around 2) in several places I got the following warning: "my" variable $template masks earlier declaration in same scope so I removed the my variables here. 3) replacing the plan from 57 to 68 4) replacing use Test by use Test::More After that I ran the whole thing through Devel::Cover and got the following reports: Default: ---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt branch cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/HTML/Template.pm 84.9 62.8 49.4 84.3 72.2 100.0 73.4 Total 84.9 62.8 49.4 84.3 72.2 100.0 73.4 ---------------------------- ------ ------ ------ ------ ------ ------ ------ With TEST_SHARED_MEMORY=1 ---------------------------- ------ ------ ------ ------ ------ ------ ------ File stmt branch cond sub pod time total ---------------------------- ------ ------ ------ ------ ------ ------ ------ blib/lib/HTML/Template.pm 89.6 66.3 53.7 90.2 72.2 100.0 77.6 Total 89.6 66.3 53.7 90.2 72.2 100.0 77.6 ---------------------------- ------ ------ ------ ------ ------ ------ ------ If you accept this *addition* to the test, I'll be able to add eve more test to increase the coverage of the test suit. (among other things testing the error messages). regards Gabor ps. I know I am pushy. I was told so already. |
From: Sam T. <sa...@tr...> - 2004-06-18 06:40:25
|
On Fri, 18 Jun 2004, Mathew Robertson wrote: > > Ultimately HTML::Template v2 doesn't offer much in terms of official > > support for sub-classes and extensions. That's a deficiency I intend > > to address in the perpetually-delayed v3. > > One of the changes that I made, was so as to support sub-classing. > As far as I can tell, the performance impact has been minimal. > Would v2.7 be a reasonable place to include this type of change > (given that the changes dont change H::T API)? Can you be more specific? I'm not sure I understand what you're talking about. -sam |
From: Mathew R. <mat...@re...> - 2004-06-18 05:56:27
|
> > Would you prefer: > > a) seperate patches per piece of functionality >=20 > Yes. That's probably a lot of work though, so you might want to run > them by me and let me save you the trouble of creating patches for the > ones I won't take. ;) [snip] > Ultimately HTML::Template v2 doesn't offer much in terms of official > support for sub-classes and extensions. That's a deficiency I intend > to address in the perpetually-delayed v3. One of the changes that I made, was so as to support sub-classing. As = far as I can tell, the performance impact has been minimal. Would v2.7 = be a reasonable place to include this type of change (given that the = changes dont change H::T API)? Mathew |
From: Sam T. <sa...@tr...> - 2004-06-18 01:53:30
|
On Fri, 18 Jun 2004, Mathew Robertson wrote: > Would you prefer: > a) seperate patches per piece of functionality Yes. That's probably a lot of work though, so you might want to run them by me and let me save you the trouble of creating patches for the ones I won't take. ;) -sam |
From: Sam T. <sa...@tr...> - 2004-06-18 01:52:02
|
On Fri, 18 Jun 2004, Mathew Robertson wrote: > > Yup, that's right. It is private. But since when has that stopped Cees? > > :-) > > ok - I was under the impression that the purpose of the _cache_key > method was to all a custom cache key capability - in which case the > method should be public. That's one possible use, but really it's just a natural result of my efforts to fix a flaw in the existing caching system. I didn't add the docs or tests that would be needed to make a real public feature out of it. Ultimately HTML::Template v2 doesn't offer much in terms of official support for sub-classes and extensions. That's a deficiency I intend to address in the perpetually-delayed v3. -sam |
From: Mathew R. <mat...@re...> - 2004-06-18 01:23:51
|
> It's that first one that's stimulating this release. However, I know > a number of you have pending bugs and (shudder) new features that > you'd like to see addressed in the next release. Now is the time to > get them in for 2.7. >=20 > If you're submitting a bug report please include a complete test case > that demonstrates the problem. For extra points make it a patch to > test.pl in CVS. >=20 > If you're submitting a patch, please make it against CVS if you can. > If not then please make sure it was made against the 2.6 release. Would you prefer: a) seperate patches per piece of functionality b) one whole patch c) the whole module - that way you can diff your own changes d) all of above ? Mathew |
From: Mathew R. <mat...@re...> - 2004-06-18 01:21:42
|
> > hmm... general perl-ism is to use a leading underscore to refer to > > the method call as being private. >=20 > Yup, that's right. It is private. But since when has that stopped = Cees? :-) ok - I was under the impression that the purpose of the _cache_key = method was to all a custom cache key capability - in which case the = method should be public. my $0.03 Mathew |
From: Sam T. <sa...@tr...> - 2004-06-18 00:28:09
|
On Fri, 18 Jun 2004, Mathew Robertson wrote: > hmm... general perl-ism is to use a leading underscore to refer to > the method call as being private. Yup, that's right. It is private. But since when has that stopped Cees? -sam |
From: Mathew R. <mat...@re...> - 2004-06-18 00:24:45
|
hmm... general perl-ism is to use a leading underscore to refer to the = method call as being private. Mathew ----- Original Message -----=20 From: "Sam Tregar" <sa...@tr...> To: "Cees Hek" <ce...@si...> Cc: <htm...@li...> Sent: Friday, June 18, 2004 8:21 AM Subject: Re: [htmltmpl] HTML::Template v2.7 is Coming! > On Thu, 17 Jun 2004, Cees Hek wrote: >=20 > > I am guessing that you pulled out the key generation code into a > > subroutine that can be overridden in a subclass? That will allow = for > > added flexibility with the filter support and caching, which is what > > sparked the discussion I linked to above (ie filters that = dynamically > > alter the template based on external parameters could not be cached > > since the filter is only applied the first time). >=20 > You're right, I did. There's a new method _cache_key() which could be > overridden in a sub-class to manipulate the cache key. >=20 > -sam >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference > Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer > Conference, June 28 - July 1 at the Moscone Center in San Francisco, = CA > REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code = NWMGYKND > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users > |
From: Sam T. <sa...@tr...> - 2004-06-17 22:21:09
|
On Thu, 17 Jun 2004, Cees Hek wrote: > I am guessing that you pulled out the key generation code into a > subroutine that can be overridden in a subclass? That will allow for > added flexibility with the filter support and caching, which is what > sparked the discussion I linked to above (ie filters that dynamically > alter the template based on external parameters could not be cached > since the filter is only applied the first time). You're right, I did. There's a new method _cache_key() which could be overridden in a sub-class to manipulate the cache key. -sam |
From: Sam T. <sa...@tr...> - 2004-06-17 22:19:37
|
On Thu, 17 Jun 2004, Gabor Szabo wrote: > if you don't mind to include a Test::More dependency then > I'd be glad to send you an additional (or replacement) > test suit using Test::More. I don't think so. It's not that I mind a Test::More dependency - lots of my modules use Test::More - but that I'm not interested in investing the time it would take a to be sure that the new test suite was as good as the old one. Since the tests don't have tests themselves it's very expensive (in terms of time) to refactor them. -sam |
From: Cees H. <ce...@si...> - 2004-06-17 21:47:27
|
Sam Tregar wrote: > Hello all. I'm sure it will come as a great shock, but I'm planning > to make a new release of HTML::Template sometime next week. Here is > what I have so far: > > - Bug Fix: Improved cache keying to be sensitive to options which > alter the compilation of templates (path, search_path, > loop_context_vars and global_vars). Calls to new() with > different settings for any of these options will no longer pull > incorrect cached objects. Hi Sam, It's 2 years late for me, but still a welcome addition ;) http://bluedot.net/mail/archive/read.php?f=9&i=2530&t=2514 I worked around my problem in a different way, so I never brought it up again. I am guessing that you pulled out the key generation code into a subroutine that can be overridden in a subclass? That will allow for added flexibility with the filter support and caching, which is what sparked the discussion I linked to above (ie filters that dynamically alter the template based on external parameters could not be cached since the filter is only applied the first time). Cheers, Cees |
From: Gabor S. <ga...@pe...> - 2004-06-17 20:24:41
|
Hi Sam, if you don't mind to include a Test::More dependency then I'd be glad to send you an additional (or replacement) test suit using Test::More. It will fix a number of issues with the current test suit staring from the fact that the number of tests is not correct in test.pl till the capability to get test coverage using Devel::Cover. If you let me do this then I can actually add further tests to have better coverage of the whole distribution. regards Gabor |