in reply to Passing a sth to CGI form element methods
We'd like to cut down on the size of the memory footprint of some of our applications and one of the worst offenders is the building of large popup menus.I'm a bit curious. How many entries do you have in your pull down lists? How much memory are you considering memory bloat? Are you using CGI.pm before the call to popup_menu or is the memory bloat you are seeing include all of CGI.pm?
...but I'd like to pass in a statement handle and have it iterate through the results to save on memory bloat.
my $template = ' <select name="foo"> [%- FOREACH row = sth.fetchrow_hashref %] <option value="[% row.id %]">[% row.text %]</option> [%- END %] </select> '; Template->process(\$template, {sth => $sth});
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Passing a sth to CGI form element methods
by agianni (Hermit) on Apr 11, 2007 at 14:43 UTC |