Re: [htmltmpl] HTML::Template: Installation Problem on Darwin/Mac OS X

2005-02-26 Thread Cees Hek
Sam Tregar wrote: The best workaround is to just switch to the file_cache. In most cases it's just as fast as shared_cache due to the OS caching file access and it's a heck of a lot easier to work with (no arbitrary limits, no need for special tools to clear the cache, etc). I would seconds Sam's

Re: [htmltmpl] The snarkiest way to print out specific values of a hash using HTML::Template?

2005-02-17 Thread Cees Hek
Justin Simoni wrote: Hello all, Been looking for a while for this answer, and seem to think it must have been asked before, although both the archives mentioned in the docs are down. So here goes: Is there an easy way to pass a Hash to HTML::Template in hopes to use the key/value pairs, without

Re: [htmltmpl] New to this - conditional problem i think

2005-01-21 Thread Cees Hek
Thomas Nyman wrote: push @{$rows}, $_ while $_ = $sth->fetchrow_hashref(); i figured..hey this is a hash so i can use if (exists $rows{$fornamn}) etc .. but alas no. apparently push gets an array and not a hash if I now get it correctly. Actually, what you have is an array of hashes. So $rows con

Re: [htmltmpl] language support

2004-08-29 Thread Cees Hek
Markus Spring wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin Sarfy wrote: | Hi folks, | | I lack multiple language support in HTML::Template. ..SNIP.. 3 is done by subclassing HTML::Template to recognize filter arguments as a part of the cache key (idea and code from Cees Hek), so

Re: [htmltmpl] Is HTML::Template pure Perl?

2004-08-03 Thread Cees Hek
Sam Tregar wrote: On Mon, 2 Aug 2004, Carl Franks wrote: To figure out if any other module is pure perl, search for it on search.cpan.org Then follow the link with the module version number (e.g. HTML-Template-2.7). Then click on the [Browse] link to view the modules' files. If there are no *.xs

Re: [htmltmpl] HTML::Template v2.7 is Coming!

2004-06-17 Thread Cees Hek
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

Re: [htmltmpl] RFC: Objects in templates

2004-06-02 Thread Cees Hek
Quoting michael <[EMAIL PROTECTED]>: > Since others are in the mood for RFCing, here's something that I was > thinking about implementing for myself and I just wanted to know how > others felt about it as well. This has come up many times on the list. Search the archives for some other opinions

Re: [htmltmpl] Re: [Comment] H::T => using to trigger

2004-05-09 Thread Cees Hek
C Hagstrom wrote: At any rate, what I ended up doing that appears to work was set the editing form up as an included file, and create a "parent" template up with this code: I digressed a bit, but I guess the short comment is that I was able to "switch" the on

Re: [htmltmpl] Select/option How to set "selected"?

2004-05-06 Thread Cees Hek
Mathew Robertson wrote: Matthew, I don't understand what's wrong with Jason's example. If DBI yields a result in the format HTML::Template understands, what's wrong with taking advantage of that? How would you change his example to make it more indirect and abstract? I would do something like: {

Re: [htmltmpl] Select/option How to set "selected"?

2004-05-04 Thread Cees Hek
Sam Tregar wrote: On Mon, 3 May 2004, Mark Fuller wrote: It just seems to me like "selected" and "checked" are fairly basic and there's no easy (more built-in) way to accomodate them. It seems like you recognize that they require a bit of ugliness. Why not provide for them somehow? Because CGI.p

Re: [htmltmpl] speeding up an h-t website on a windoze box

2004-04-17 Thread Cees Hek
Puneet Kishor wrote: I want to experience the dizzying effect of speed on Windoze. Mod_perl is out because the server might be running IIS (and even if it isn't, I am sure my script will have to be re-hacked). I was hoping for IPC-SharedCache, but that doesn't seem possible on Win. I tried CGI-

Re: [htmltmpl] Variable in TMPL_INCLUDE

2004-04-05 Thread Cees Hek
Jason Yates wrote: Puneet Kishor wrote: I thought this problem was solved with judicious use of filters. There are enough posts on this in the archives. Am I missing something here? Or are folks simply averse to using filters? In my case, I pull a id from a database and then load the template w

Re: [htmltmpl] H-T strangeness with CGI-Session

2004-03-26 Thread Cees Hek
Puneet Kishor wrote: The problem is thus -- I am storing only the identifying info and a descriptive text. But the AofH in the Session file is showing additional info that looks suspiciously like the loop_context_vars. Here is an excerpt from my Session file -- "rolodex" => [{"ROLODEXVAL" => 33

Re: [htmltmpl] Stumbled on bug with multiple tmpl_include tags on line

2004-03-18 Thread Cees Hek
Clifton Royston wrote: OK, I think I have this worked out. What was probably confusing us both is the builtin fallback (IIRC) to trying some different paths, including the current working dir, to load the templates from. The result is that if you are executing the script from the same relative

Re: [htmltmpl] Stumbled on bug with multiple tmpl_include tags on line

2004-03-17 Thread Cees Hek
Clifton Royston wrote: On Wed, Mar 17, 2004 at 11:45:42PM -0500, Cees Hek wrote: Hi Clifton, I tried, but can't reproduce this problem. Can you include a small code sample with templates that actually displays this problem. Simply edit the template I provided as follows; I'

Re: [htmltmpl] Stumbled on bug with multiple tmpl_include tags on line

2004-03-17 Thread Cees Hek
Hi Clifton, I tried, but can't reproduce this problem. Can you include a small code sample with templates that actually displays this problem. Also, it might help to tells us which version of HTML::Template and which perl you are using (from the error message it looks like you are using perl

Re: [htmltmpl] Radio button question

2004-02-11 Thread Cees Hek
C Hagstrom wrote: I'm wondering if I'm missing something simple here . I've got things working with a pretty cludgy looking work around: In the programming: ##CH likely a better way to do this if ($q->param('Color') eq 'Red') { $q->param('Red','checked') }; if ($q->param('Color'

Re: [htmltmpl] Re: H::T future

2003-12-09 Thread Cees Hek
Karen J. Cravens wrote: content you're stuffing. Unless, as I'll probably end up doing, you're processing the content as a nested template, a la: $page->param("content", $subpage->output)). If you end up having to create 2 or more HTML::Template objects to generate one response page, then you end

Re: [htmltmpl] Re: H::T future

2003-12-09 Thread Cees Hek
Puneet Kishor wrote: I know that you don't mean to state that in an absolute sort of way, No, I am just explaining the way things work (or don't work) for me, but TMTOWTDI :) because I disagree. I also include headers/footers, and code title and bunch of other things in the headers and footers.

Re: [htmltmpl] Re: H::T future

2003-12-09 Thread Cees Hek
Sam Tregar wrote: On Tue, 9 Dec 2003, Lance A. Brown wrote: # we allow tags like this in our templates that will define values # to be set as parameters # My eyes! It burns! Arrrgh... :) I know it goes against your philosophy of HTML::Template, and that this can be abused in

Re: [htmltmpl] Re: H::T future

2003-12-09 Thread Cees Hek
Lance A. Brown wrote: On Mon, 2003-12-08 at 20:31, Karen J. Cravens wrote: Argh. I can't remember where, but I ran across a Website package using HTML::Template that had this feature. The templates in the package have tags and used a filter function to extract them from the templates and insert t

Re: H::T future (was Re: [htmltmpl] xml complant tags)

2003-12-08 Thread Cees Hek
Sam Tregar wrote: I've considered doing an HTML::Template version 3 a few times, but never found the time to do it. I even went so far as to draft a design document. Here it is! (Note, I have no plans to actually do this work anytime soon.) Hi Sam, Something that might be of interest to you tha

RE: [htmltmpl] Comparing H::T:Expr variables

2003-11-19 Thread Cees Hek
Quoting Chris <[EMAIL PROTECTED]>: > I just added the strict option on: > > my $template = HTML::Template->new(filename => 'index.tmpl', strict => 0, > global_vars => 1); You do mean HTML::Template::Expr in the above code right? You are getting the error because HTML::Template can't parse cor

Re: [htmltmpl] newbie so this may be a faq

2003-11-03 Thread Cees Hek
Quoting "l.f.elia" <[EMAIL PROTECTED]>: > Hello All, > I've been checking out HTML::Template, ($HTML::Template::VERSION = > '2.6';), and I cannot get it to work with the examples in the > documentation. > > I am using activestate perl ActivePerl Build 633 on win32, nothing > fancy just the examp

Re: [htmltmpl] how can I insert non-printing comments in templates?

2003-10-26 Thread Cees Hek
Quoting Puneet Kishor <[EMAIL PROTECTED]>: > While templates are supposed to be (almost) pure html, I want to insert > comments in the templates (for my benefit... all those loops within > loops get confusing after a while) that I don't want printed in the > browser. Would be nice to have some

Re: [htmltmpl] A valid reason for template support for select lists?

2003-10-19 Thread Cees Hek
Perhaps you are looking at the wrong tool to solve this problem. Personally I never use TMPL_VARs to fill out my forms. I use HTML::FillInForm to do it for me. This would solve your problem and simplify your templates (no need for the tmpl_if mess to select an option in a selection box). With

Re: [htmltmpl] Dynamic and sticky forms

2003-09-26 Thread Cees Hek
I would suggest using HTML::FillInForms to provide the sticky fields that you are after. It will simplify your templates, and save you lots of headaches. http://search.cpan.org/author/TJMATHER/HTML-FillInForm-1.02/lib/HTML/FillInForm.pm Cheers, Cees Quoting Wojciech Pietron <[EMAIL PROTECTED

Re: [htmltmpl] HTML::Template::Expr and CGI::Application

2003-07-05 Thread Cees Hek
Quoting Steven Bauer <[EMAIL PROTECTED]>: > I am working on a project using CGI::Application. > > CGI::Application seems to default to using HTML::Template by > default, which I tried to override by requiring HTML::Template:Expr > in my application. > > However, when I use expression sytax, I

Re: [htmltmpl] Performance of H:T with templates on NFS

2003-05-30 Thread Cees Hek
Quoting Tommy Davis <[EMAIL PROTECTED]>: > Hi, > > We use HTML::Template heavily in conjunction with mod_perl on linux. > We're considering moving all our templates to a nfs-server. However I'm > a little concerned about performance. > > H:T does a mtime check everytime we use a template (using

Re: [htmltmpl] Translating Templates: new module RFC

2003-03-12 Thread Cees Hek
Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>: > This module raises some H::T specific issues: > > * H::T needs template files if you want to use caching - which is > necessary as translating adds processing time but has to be done > only once for every template. At the moment I plan to lin

Re: [htmltmpl] Re: HTML Template versus Template Toolkit (fwd)

2003-01-24 Thread Cees Hek
Quoting Dave Van Abel <[EMAIL PROTECTED]>: > As to "run like hell from Mod Perl", I am the one who said it and will > defend my statement. > > *Mod Perl*: > > Mod Perl is great, and I like to use it, in correct instances. > > However, when the weakly written Perl - not using strict

Re: Fwd: [htmltmpl] Slow CGI when linking to a CSS or JS

2003-01-21 Thread Cees Hek
Sometime on Jan 21, Howard Kim assembled some asciibets to say: >Thanks to everyone for the help and advice. I have determined that > it is the server and not CGI::Template that is being slow. Now I just Is it possible that you are running your development server in single process mode (w

Re: FW: [htmltmpl] how to display data in four columns

2003-01-16 Thread Cees Hek
Quoting "Kapoor, Nishikant X" <[EMAIL PROTECTED]>: > Chris has suggested a very fine solution. Some of you might find it crossing > the presentation line but it seems to be pretty generic in nature. If you want to leave the decision of how many columns to use to the Template Designer, then you ca

Re: [htmltmpl] Tag-within-tag question

2002-12-24 Thread Cees Hek
Quoting Peter Scott <[EMAIL PROTECTED]>: > This is arguably not a HTML::Template question but since not many > people besides HTML::Template users will have encountered this > situation I will ask here. > > I have a lot of template code like > > SELECTED>Foo Although not a general solut

Re: [htmltmpl] Include namespaces

2002-10-16 Thread Cees Hek
I like this idea, although I have a suggestion for handling this in a slightly different manner. By using the LOOP construct to simulate namespaces, your namespace could get polluted if using global_vars=1. That might be a desirable benefit in some situations, but most likely it will not be de

Re: [htmltmpl] using a base "skin/gui" with H-T

2002-09-06 Thread Cees Hek
Quoting Philip S Tellis <[EMAIL PROTECTED]>: > On Thu, 5 Sep 2002, csajl wrote: > > > i was thinking i'd have to parse the entire x.tmpl into a string and > > supply that as a tmpl_var when i parse through the gui.tmpl. > > use a filter. something like this: > > > > and in the perl filter:

Re: [htmltmpl] template file names as comments

2002-08-08 Thread Cees Hek
Quoting Bill Moseley <[EMAIL PROTECTED]>: > Hi, > > I'm working on a project with quite a few templates, and a project that I > haven't touched in over a year. What would be somewhat handy for both me > and the people editing the templates is if I could get HTML::Template to > prepend to a temp

RE: [htmltmpl] Re: Patches for HTML-Template-2.5.tar.gz

2002-07-24 Thread Cees Hek
Quoting Kenny Smith <[EMAIL PROTECTED]>: > >> 5. add TMPL_DEF tag for defining new parameters > >> > >> > > >I don't like this. Mixing display logic with setup of variables is a very > >dangerous thing. > > I don't even know what this is really useful for? If you are hard coding > the