Re: [htmltmpl] Using H::T for testing
Brought to you by:
samtregar
From: Timm M. <tm...@ag...> - 2005-02-23 21:23:08
|
At 03:12 PM 2/23/2005, Keith Jackson wrote: <> >If I put a statement in my perl code just before the $t->output which >dumps the contents of $t->param, > >map("$_ = ".Dumper($template->param($_)) > >save that output as a baseline. Then for testing repeat the process but >now compare the values to the baseline data. I wrote HTML::Template::Dumper to do basically the same thing. It is designed to use a verity of dumping formats (Data::Dumper, YAML, whatever). You need to make some minimal modifications to the program (replace "use HTML::Template" with "use HTML::Template::Dumper" and set an output format) to run the tests--these should be significantly less than modifications to reinvent what HTML::Template::Dumper already does. Timm Murray IT Web Asst. ASA-CSSA-SSSA 677 S Segoe Rd. Madison, WI 53711-1086 Phone: 608-268-4944 Fax: 608-273-2021 www.agronomy.org www.crops.org www.soils.org |