Re: [htmltmpl] Fwd: Re: retrieving default values

2011-11-17 Thread Roger Burton West
On Thu, Nov 17, 2011 at 10:51:28PM +0100, Marcel van Dorp wrote: >Any chance this will be implemented soon? I can work around with SET >names related to LOOP names, but that is ugly. Very unlikely. Roger -- All the data

[htmltmpl] Fwd: Re: retrieving default values

2011-11-17 Thread Marcel van Dorp
ransfer-Encoding: 7bit On 11/17/2011 09:15 PM, Roger Burton West wrote: > On Thu, Nov 17, 2011 at 05:59:27PM +0100, Marcel van Dorp wrote: >> I would like to retrieve the default value from the template, eg. >> TMPL_VAR NAME="VAR1" DEFAULT="DEFAULTVALUE1" > > My extension module, HTML::Template::

Re: [htmltmpl] retrieving default values

2011-11-17 Thread Roger Burton West
On Thu, Nov 17, 2011 at 05:59:27PM +0100, Marcel van Dorp wrote: >I would like to retrieve the default value from the template, eg. >TMPL_VAR NAME="VAR1" DEFAULT="DEFAULTVALUE1" My extension module, HTML::Template::Set, allows you to do and retrieve this through the query interface. If this wou

Re: [htmltmpl] retrieving default values

2011-11-17 Thread Michael Peters
On 11/17/2011 03:03 PM, Mathew Robertson wrote: > I think you have misunderstand what H::T is used for -> you put data > into the template, not pull data out. This isn't strictly true. The query() interface of H::T is very useful, especially if you are creating template-driven applications (we h

Re: [htmltmpl] retrieving default values

2011-11-17 Thread Mathew Robertson
Hi Marcel, I think you have misunderstand what H::T is used for -> you put data into the template, not pull data out. In this case, DEFAULT is used when you put in VAR1, and it happens to be undef. cheers, Mathew Robertson On 18 November 2011 03:59, Marcel van Dorp wrote: > Hi list, > > I'm n

[htmltmpl] retrieving default values

2011-11-17 Thread Marcel van Dorp
Hi list, I'm new here, so please be kind. I would like to retrieve the default value from the template, eg. TMPL_VAR NAME="VAR1" DEFAULT="DEFAULTVALUE1" I would like to process this value, but my $value = $tpl->param('VAR1'); does not give me the value "DEFAULTVALUE1" I cannot find another w