Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: RFC: Almost a Book

by wolv (Pilgrim)
on Apr 19, 2006 at 06:21 UTC ( [id://544268]=note: print w/replies, xml ) Need Help??


in reply to RFC: Almost a Book

Looks very nice. Something that caugh my eye: did you create the UML diagrams automatically, and if so, with what tools?

I have a basic Perl5 structural grapher, implemented with the help of PPI and some not-so-evil introspection, but I haven't been able to find a good automatic layouter for class structures (although Graph::Easy does okay at times).

Replies are listed 'Best First'.
Re^2: RFC: Almost a Book
by billh (Pilgrim) on Apr 19, 2006 at 07:29 UTC
    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.

      Thank you for the information. I wish I had a Mac. :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-05-30 07:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found