Re: Using H::T for testing

Timm Murray <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>
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




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.