Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Checkstyle For HTML Templates

by vishi83 (Pilgrim)
on Oct 22, 2005 at 13:27 UTC ( #502205=perlquestion: print w/replies, xml ) Need Help??
vishi83 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Great Ppl !!

Jus wanted to clarify my doubt. I thought of using perltidy for my scripts to check and clean up my PERL scripts.. Also another good option would be using checkstyle.. But my question to you ppl is :

Is there any such sort of programs for HTML Templates.. Anything that can check for badstyle of html templates like wat perltidy and checkstyle does for our perl scripts.

Thanks and awaiting you reply,


Replies are listed 'Best First'.
Re: Checkstyle For HTML Templates
by Corion (Pope) on Oct 22, 2005 at 13:29 UTC

    You mean, like html tidy (on Sourceforge and the original page, also on CPAN)? It doesn't work for HTML templates, but it works for the output generated by your templates. Well, actually, it works for a certain kind of HTML Templates, namely those used by Petal. If you're using a different templating system, you will need to check the output. But you want to do that anyway, as invalid input to your templates can generate invalid output.

      If you use HTML::Template you can use template tags in the form of HTML comments.

      <!-- TMPL_VAR NAME=PARAM1 -->

      This would allow you to validate the template.

        Well, not everything:

        <div class="<!-- TMPL_VAR NAME=PARAM2 -->">Test</div>

        Comment tags will validate as long as they are used outside of HTML tags.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://502205]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2017-12-12 07:29 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (327 votes). Check out past polls.