Re: [htmltmpl] retrieving default values

2011-11-20 Thread Roger Burton West
On Sun, Nov 20, 2011 at 08:40:05AM +0100, Marcel van Dorp wrote: >I have an issue with your extension H::T::Set. > >In my template, I have: > >Debug: > If you're using _my_ Set.pm extension - which isn't on CPAN as far as I know - all you should have in the second line is It's possible that t

Re: [htmltmpl] retrieving default values

2011-11-19 Thread Marcel van Dorp
On 11/17/2011 10:03 PM, Marcel van Dorp wrote: > 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 extensio

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