Re: [htmltmpl] new work on HTML::Template

2011-04-12 Thread Mathew Robertson
Hi H::T users, Last week there was a discussion regarding enhancements to H::T. As a result, I have uploaded my enhancements to CPAN: https://pause.perl.org/pub/PAUSE/authors/id/M/MA/MATHEW/ feel free to criticise... :) regards, Mathew Robertson -

Re: [htmltmpl] new work on HTML::Template

2011-04-11 Thread Mathew Robertson
> > Another feature request: would it be possible to use a var name in an > include tag? The goal is to include a template whose name is the value > of a var. Does someone already do such a thing? > > Clément. > > Yes, you can do that now - if you call use the "recursive templates" I listed above.

Re: [htmltmpl] new work on HTML::Template

2011-04-08 Thread Clément OUDOT
Le 7 avril 2011 15:39, Michael Peters a écrit : > On 04/07/2011 03:42 AM, Clément OUDOT wrote: > >> We develop a special filter, called translate_template, that allows to >> define  markup in the template with translations. When the >> filter run, it only keep the translation of the user language.

Re: [htmltmpl] new work on HTML::Template

2011-04-07 Thread Mathew Robertson
Its interesting that thread of discussion has been raised I have been using H::T for years - as a result, I have added most of these features to my own instance. Just this week I finished testing a new H::T::Bundle module which I was going to upload to CPAN, Features in my instance: - some b

Re: [htmltmpl] new work on HTML::Template

2011-04-07 Thread Michael Peters
On 04/07/2011 03:42 AM, Clément OUDOT wrote: > We develop a special filter, called translate_template, that allows to > define markup in the template with translations. When the > filter run, it only keep the translation of the user language. With > this, we have internationalized templates. We

Re: [htmltmpl] new work on HTML::Template

2011-04-07 Thread Clément OUDOT
2011/4/6 Michael Peters : > > Any questions? Comments? Verbal Abuse? Any offers of help? > Hi, we use H::T in LemonLDAP::NG, a free Web Single Sign On (http://lemonldap-ng.org), it is very helpful! We develop a special filter, called translate_template, that allows to define markup in the templ

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Lyle
On 07/04/2011 01:41, Brad Baxter wrote: > On Wed, Apr 6, 2011 at 8:28 PM, Lyle wrote: >> For further clarification, and without looking at the H::T implementation. >> You are calling it an object because in the sense of the term 'object' the >> template is an object. But, it's not a Perl object, w

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Brad Baxter
On Wed, Apr 6, 2011 at 8:28 PM, Lyle wrote: > For further clarification, and without looking at the H::T implementation. > You are calling it an object because in the sense of the term 'object' the > template is an object. But, it's not a Perl object, which is likely where > further confusion come

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Lyle
On 07/04/2011 00:30, Alex Teslik wrote: > On Wed, 06 Apr 2011 17:53:01 -0400, Michael Peters wrote >> Maybe a new "lexical_vars" option that will fall back to a parent- >> loop or top-level declared var if one doesn't exist in the current >> loop? That would be similar to the way vars work in Perl

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Lyle
On 07/04/2011 00:36, Brad Baxter wrote: On Wed, Apr 6, 2011 at 6:57 PM, Lyle wrote: I think using the term object here is confusing. I use the term "object", because it is in fact an object. For further clarification, and without looking at the H::T implementation. You are calling it an obj

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Brad Baxter
On Wed, Apr 6, 2011 at 6:57 PM, Lyle wrote: > On 06/04/2011 23:37, Brad Baxter wrote: > ... > So my complaint is that my perl code is setting the > same values in the $tmpl object, but the module > does not "honor" the value unless it sees the loop > in the template a certain way. My explanation

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Alex Teslik
On Wed, 06 Apr 2011 17:53:01 -0400, Michael Peters wrote > > Maybe a new "lexical_vars" option that will fall back to a parent- > loop or top-level declared var if one doesn't exist in the current > loop? That would be similar to the way vars work in Perl loops. Is > that what you're asking for?

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Lyle
On 06/04/2011 23:37, Brad Baxter wrote: ... So my complaint is that my perl code is setting the same values in the $tmpl object, but the module does not "honor" the value unless it sees the loop in the template a certain way. My explanation is confusing, I know -- the whole situation is confusin

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Lyle
On 06/04/2011 22:41, Alex Teslik wrote: > On Wed, 06 Apr 2011 15:21:13 -0400, Michael Peters wrote >> After talking with Sam, he's given me permission to try to further >> the development of HTML::Template to give some needed features while >> maintaining the spirit that it was originally written i

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Brad Baxter
On Wed, Apr 6, 2011 at 5:28 PM, Michael Peters wrote: > On 04/06/2011 05:13 PM, Brad Baxter wrote: > >> But finally I decided I needed to abandon it, >> because mentally I just couldn't handle the fact that setting an >> attribute in the object was dependent on the attribute existing in >> the tem

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Alex Teslik
On Wed, 06 Apr 2011 15:21:13 -0400, Michael Peters wrote > This email is an announcement of sorts for some work I've got > planned for HTML::Template. I'm greatly in debt to Sam Tregar for > this module and the use that I've gotten out it over the years. > > After talking with Sam, he's given me

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Matt Taylor
I'm not a very advanced user, but I would like to see one minor change. I would like to be able to include a closing slash, for example: Just because jEdit's html mode gets confused when trying to identify beginning and ending tags. Matt On 04/06/2011 01:21 PM, Michael Peters wrote: > This e

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
On 04/06/2011 05:41 PM, Alex Teslik wrote: > As long as the main feature of keeping logic completely separate from > presentation is left intact, this is great news. The limitations of H::T are > the exact reason we chose it as our templating system. Yes definitely. We use it heavily in places wh

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
On 04/06/2011 05:12 PM, Roger Burton West wrote: > Sure, what do you need? H::T has been good to me. Right now, I think just being available to test things would be a good start. I'm hoping to have an initial release in the not too distant future that doesn't do much except fix some small bugs

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Roger Burton West
On Wed, Apr 06, 2011 at 03:21:13PM -0400, Michael Peters wrote: >+ Add a tag. Could be useful for template driven behaviors > (combined with param() or query()) or when combined with > : I've found this very useful, though: (a) I'm not sure it needs to live in the base module; (b) the behav

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
On 04/06/2011 05:13 PM, Brad Baxter wrote: > But finally I decided I needed to abandon it, > because mentally I just couldn't handle the fact that setting an > attribute in the object was dependent on the attribute existing in > the template. I'm not sure I understand this problem. HTML template

Re: [htmltmpl] new work on HTML::Template

2011-04-06 Thread Brad Baxter
On Wed, Apr 6, 2011 at 3:21 PM, Michael Peters wrote: > Any questions? Comments? Verbal Abuse? Any offers of help? I have some comments which are intended to be constructive, though they may come across as otherwise. I apologize in advance. I used HTML::Template for a few years. I was happy wi

[htmltmpl] new work on HTML::Template

2011-04-06 Thread Michael Peters
This email is an announcement of sorts for some work I've got planned for HTML::Template. I'm greatly in debt to Sam Tregar for this module and the use that I've gotten out it over the years. After talking with Sam, he's given me permission to try to further the development of HTML::Template to