I'm curious as to what other people do when it comes to generating complex pages of HTML from a perl script.

My typical method is that I design the web pages in HotMetal, and use a super-classed version of the HTML::Parser module that does variable substitution (and more) for all the dynamic stuff.

I look at a page like the main page of the Monastery, or SlashDot, and wonder how it's managed. I'm familiar with the CGI module, but formatting the perl source so that it's readable has always been a problem. I prefer my HTML indented, to the effect of:

<table ...> <tr> <td><p>This is some text</p></td> </tr> </table>

I have yet to find a way of formatting that in perl that allows me to understand at a glance how the page is going to look. I also know that I can use some of the "fancy" (read: highly compressed) formatting as shown in the CGI.pm docs, but I don't consider that maintainable (from the standpoint of not using the CGI module everyday, and coming back to it in a few months).

I'm proficient enough in HTML, but I don't want to "think" about writing in HTML. I'd rather "think" about my writing in Perl. This is why I use pages that I can design (and others can edit) in an HTML editor.

So, monks, friars, saints, and the lot of you, what's your opinion? How do you manage your massive amounts of HTML?

--Chris

In reply to Managing large CGI pages by jcwren

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.