Ok, well, cludged my own solution to this problem:

On Sep 11, 2006, at 11:30 PM, Justin Simoni wrote:
> 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.

Before I send the template file to HTML::Lint, I can just strip out  
the HTML comments, and now I'm just testing the HTML, sans the  
HTML::Template comments. The only downside to this, is that the line  
numbers may be different between my templates and what the tests are  
returning as the line where a problem may lay. Template files aren't  
usually thousands of lines long, so this shouldn't be the biggest  
problem in the world.

And, from the small set of files I've tested, looks like they're all  
structurally sound HTML files (except for the problems the tests did  
find), which was a hunch of mine that HTML::Template templates would  
be (sans the embedded comments in tags), since HTML::Template sort of  
mandates a clean separation between design and code.

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 11:30 PM, Justin Simoni wrote:

>
>
> 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
> _______________________________________________
> Html-template-users mailing list
> Html-template-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/html-template-users
>


-------------------------------------------------------------------------
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
_______________________________________________
Html-template-users mailing list
Html-template-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to