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
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
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
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
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
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
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
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
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:
{
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
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-
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
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
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
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'
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
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'
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
38 matches
Mail list logo