I know that the HTML::Template docs FAQ answers "What's the best way to create a <select> form element using HTML::Template" with 'use CGI'. However, I prefer to do it 'the other way'.
I've created a module to help create the loop arrays for date/time menus and am requesting feedback on a suitable module name. Below is a very short example of use. The source is at http://www.fireartist.com/temp/source.txt . The pod is at http://www.fireartist.com/temp/pod.html . I've already created a full, working test suite. I recognise that I need to work on the pod a bit. ### TEMPLATE ### <select name="startDay"> <TMPL_LOOP startDay> <option value="<TMPL_VAR value>" <TMPL_VAR selected>> <TMPL_VAR label></option> </TMPL_LOOP> </select> ### PROGRAM ### #!/usr/bin/perl -w use strict; use CGI ':cgi'; use HTML::Template; use HTML::Template::Dropdown::Date; my $template = HTML::Template->new(filename => 'dates.tmpl'); my $start = HTML::Template::Dropdown::Date->new ( date => '2004-04-01', lessYears => 2, plusYears => 0 ); $template->param (startDay => $start->dayMenu()); print header(), $template->output(); ### Thanks, Carl Franks ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Html-template-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/html-template-users