No, the diagrams are manually drawn (OmniGraffle on a mac)

There is a lot of support code for the listings however. I use PPI to transform the perl source into XML, with line number and "changed since last version" (delta="Y/N") attributes, then use XML::LibXML to search the listings with XPath. I pre-cache references to subroutines like this:

<cache-sub key="rep0" src="PScm-0.0.0/lib/PScm.xml" pkg="PScm" sub="ReadEvalPrint" />

Then displaying a sub is just:

<subsample key="rep0"/>
Also when I want to refer to a line I say:

<pl>ReadEvalPrint()</pl> on <lineno-of-sub key="rep0"/> is the central control routine of the whole interpreter. It takes an input file handle and an output file handle as arguments. Starting on <lineno-of-var key="rep0" var="*STDOUT"/> it defaults the output file handle to <pl>STDOUT</pl>, ...

Also the delta attributes allow the text that changed from the previous version to be hilighted.

The upshot of all of this is that the book is pulling the code listings directly out of a working application under CVS, I don't have to cut'n'paste anything, and changes to the codebase are immediately reflected in the book. I was quite pleased about that.


In reply to Re^2: RFC: Almost a Book by billh
in thread RFC: Almost a Book by billh

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.