If you are interested, Literate Programming provides much of the
benefits of PDL, and additional benefits as well. You describe your
program and define it in a series of named 'chunks' -- within a
chunk, you may include other chunks. Then you define/refine each
chunk. The chunk names are rather like the pseudo-code. The literate
source code file may be 'tangled' into an actual source file, or
'woven' into a typeset document (LaTeX, HTML, or some other format
depending the tools you are using).
So the root chunk (the chunk that defines the program) might
look like (for a program called 'faqgrep'):
And then later you'd create the definition for each of those included
chunks (and those may include chunks as well). So you get stepwise
refinement and flexible order of presentation (we don't have to present
those chunks in the order given, though in a case such as above it
probably makes more sense to go linearly). Each of these 'chunks' is
preceded (and/or followed) by the explanatory text (usually in LaTeX).
Tangling assembles the chunks into the proper order to create your
source code, and weaving turns it into a typeset document with any
indexing and cross-reference features you (and the LP tool) have
To find out more about LP: The faq is located
and Mark-Jason Dominus has an
on perl.com. I use the
LP tool myself (not religiously though). I've been considering writing
up a little introductory LP article for perlmonks, so let me know if
you are interested.
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:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, 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, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||