Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Checkstyle For HTML Templates

by vishi83 (Pilgrim)
on Oct 22, 2005 at 13:27 UTC ( [id://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,




Vishi.

Replies are listed 'Best First'.
Re: Checkstyle For HTML Templates
by Corion (Patriarch) 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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://502205]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-12-08 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which IDE have you been most impressed by?













    Results (50 votes). Check out past polls.