Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Re: Re: Re: Re: HTML::Template question - tmpl_ifby djantzen (Priest) |
on Dec 14, 2003 at 02:50 UTC ( [id://314603]=note: print w/replies, xml ) | Need Help?? |
Basically your generate subroutine would look like:
This works because HTML::Template::param expects a list an even number of elements in length suitable for hash type operations, and map of course produces lists, so our expression there utilizes the ternary operator (?:) to test for defined values and outputs key/value pairs. I am not really qualified to give advice about template design since I'm new to it myself. But just the fact you're using them I can comfortably say is a good sign :)
"The dead do not recognize context" -- Kai, Lexx
In Section
Seekers of Perl Wisdom
|
|