Monks,

I want to process a mostly-plain text document (one of the atxt documents semi-described in Automating a Static Website) in separate segments, doing slightly different things to each: one segment might be "Usenet-format" text, which I want to mark up with HTML::FromText; the next might be Perl code, which I want to markup as HTML with perltidy; the next might be more text, and so on. So I want to go through all of these segments, processing them appropriately, and end up with a large combined output (which I'll write to an html file or something).

One of my goals is to minimise the amount of explicit markup in the source file (which is why I'm not using XML). It strikes me that POD might be useful, if not directly, then as a base for the format I end up with.

So my questions:

  1. Are there any modules on CPAN that might be useful for this task? I've checked a couple of times, but if I was omniscient I'd be at the racetrack, not here. :-)
  2. Is POD suitable for this task? I don't really need a complex (heirarchical) markup language for this -- although I won't complain if I end up with one -- but POD is nice and clean, and has plenty of module support.

--
The hell with paco, vote for Erudil!
:wq


In reply to Segmented text processing (with POD?) by FoxtrotUniform

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.