Philip,

Have a look at this, TT2 based solution, it's a bit
bloated (as it includes page numbering and various other
functions):

http://test.cuckoo.org/script_template.txt,
the key line is: 
my $results = Emap::HolidayFinder::Tod::do_search(\%form_input,$dbh); 

This is then merged with the template by parsing it
in as a reference in %vals.

The template used (depending on number of results) would
either be:
http://test.cuckoo.org/template_results.txt
http://test.cuckoo.org/template_search.txt

Hope these examples make it clearer how design logic can
be seperated. Especially note that the code does not have
to worry about how to get a drop down list value selected
or whether an error message is to be shown (just if it
should be set).

Leo

On Tue, Jun 19, 2001 at 07:45:26AM +0200, Philip Newton wrote:
> Matthew Byng-Maddick wrote:
> > It is possible to write embedded perl templates well, but a
> > lot more difficult than if they are separated out.
> 
> How does non-embedded Perl look like, then?

Reply via email to