Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-03 Thread Boon Chew
ou make sure > die_on_bad_params => 1 > is set in your HTML::Template constructor, then any > variable which > isn't set in the template, or is misspelt will cause > the page to die - > the designer can then tell what's wrong by simply > looking at the error > message. > >

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-02 Thread Boon Chew
rl code is a useful and justifiable feature of any server-side scripting framework. - boon --- "Webmaster Techcode.NET" <[EMAIL PROTECTED]> wrote: > > - Original Message - > From: Boon Chew > > I want a way to quickly display all the info in a >

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Boon Chew
ng to say was that, I dont think it is even technically possible to do it generically.Can you think of an example of how to do it generically?  If you can, I could quite easily modify my H::T version to support this functionality.Mat Boon Chew wrote:I agree with you that the

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Boon Chew
hich writes a dumped-block into the target page.MathewPS. I maintain a version of H::T which supports sub-classing so that you can create your own TMPL tags, see: http://members.optusnet.com.au/~mathew Boon Chew wrote: I want a way to quickly display all the info in a var - a

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Boon Chew
pecial mode to H::TMathewBoon Chew wrote: Ya sorry, that's what I meant. Right now I am working on some site code, and the designer sometimes have to come to me for stuff because he doesn't always know what hash keys I am passing to him (say sometimes I might add a new o

[htmltmpl] looping through a subset of data?

2005-12-01 Thread Boon Chew
 Another newbie question about HTML::Template.Is there a way to output only a subset of a loop variable? For instance, let's say I have a template var that is a reference to array of hashes of  X elements (essentially a recordset with X rows of data), is it possible to output just the first

[htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Boon Chew
I can't find a way in the doc to loop through hash without knowing the keys in the hash.  If this feature is not available, I think the fact that the template has to always such intimiate knowledge of what's being passed to it is not always a good thing, it also makes it impossible to just du

Re: [htmltmpl] loop through a hash structure without knowing the hash keys?

2005-12-01 Thread Boon Chew
Ya sorry, that's what I meant.Right now I am working on some site code, and the designer sometimes have to come to me for stuff because he doesn't always know what hash keys I am passing to him (say sometimes I might add a new one, sometimes he mistype one, etc.).  The whole point of doing t