P is for Practical | |
PerlMonks |
HTML::Template Maintainabilityby PyrexKidd (Monk) |
on Jan 06, 2011 at 00:52 UTC ( [id://880724]=perlquestion: print w/replies, xml ) | Need Help?? |
PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question: I am attempting to build a website using the HTML::Template module to assist in abstracting the HTML out of the CGI scripts. to build my menu I defined a template and use a template loop to iterate through the list parameters passed by $tmpl->param() menu_bar.tmpl
Then in the code I use the $tmpl->param() function and pass it my list of links.
I think this code could be made cleaner using a list. My first thought was to use a hash and a loop, but that won't work because it wont come out in the correct order. I would like to get rid of all of the individual entries of: and replace them with one statement. I believe this will make future maintainability easier. can someone please point me in the right direction. Thanks. EDIT:This was my hair-brained idea... Needless to say: syntax-error... Thoughts?
Back to
Seekers of Perl Wisdom
|
|