Re: Testing HTML::Template templates

Justin Simoni <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.html-template
Message-ID <[email protected]>

On Sep 11, 2006, at 3:51 AM, Gabor Szabo wrote:
> that's good, are you also aware of the perl-qa mailing list?

I had a hunch there'd be a Kult of Kwality Assurancers for Perl :)

> Why not test the result, after processing using HTML::Template?
> That's what is really important.

The problem with testing them after they're parsed is that, depending  
on the return values of any and every <tmpl_if> and friends block,  
the return'd HTML would be different. I'm thinking that most every  
HTML::Template template is actually valid HTML structurally, even  
with the block statements and thus can be tested for valid structure.  
HTML::Lint at least barfs on the embedded comments inside HTML tags.  
That, of itself may not be valid HTML, in which case I've gotten a  
dead end.

Justin Simoni
-- 
:: is an eccentric artist, living and working in Denver, Colorado
:: URL: http://justinsimoni.com
:: Mailing List - http://justinsimoni.com/mailing_list.html


On Sep 11, 2006, at 3:51 AM, Gabor Szabo wrote:
> On 9/11/06, Justin Simoni <[email protected]> wrote:
>> Heya,
>>
>> I've thus caught the Test::More and Co bug and find myself wanting to
>> add tests to almost every part of my proggy.
>
> that's good, are you also aware of the perl-qa mailing list?
>
>> html_ok($html, "We're good.");
>
> I am not sure why do you want your templates to be Lint-able?
> It might be "nice" but it does not seem to add business value.
>
> Why not test the result, after processing using HTML::Template?
> That's what is really important.
>
> Gabor
>
>

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
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.