http://qs321.pair.com?node_id=162522

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I'm affraid my question isn't strictly to do with programming perl.

At the moment i'm just finishing off my dissertation for my degree. It's gone really well, i've developed a web spider in Perl using libwww perl modules, that gets information about the various technologies being used on the web to create web pages.

Actually if anyone is interested in my final results, you can see them at http://www.webchalkboard.com/bot/

Anyway, my problem at the moment is deciding the best way describe how my program work. I've tried drawing a JSD structure diagram, but that doesn't really show how all my sub routines work together. If I was describing an object orientated system I could draw a class diagram. But what's the best way to represent how a Perl program works? I want to demonstrate how the main program calls the various sub routines which perform tasks, and then return to the main program again.

I hope that's all clear, thanks, Tom

Replies are listed 'Best First'.
Re: Software Design
by mattr (Curate) on Apr 27, 2002 at 16:46 UTC
    You might like to check out GraphViz-Data-Structure-0.07 (in the cpan nodelet below) which will graph your program and can make a graph of what gets called during a program run, using Devel::Prof.

    Wouldn't an ordinary flowchart work though?

      A graph is sometimes a help. But I don't think flow chart help.

      As an illustration that a graph can obfuscate things instead of helping is my graphing of the perl grammar. I have done that before Leon Brocart wrote his modules. He once used that graph to demonstrate the capability of graphviz. Clearly, "strongly" connected graphs are not very readable.

      But Doxygen uses graphviz pretty well. I use it to navigate thru the TeXmacs sources. click any class name to see such graphs.

      -- stefp -- check out TeXmacs wiki

      thanks, i'll take a look.
      I was going to do a flow chart, but then my tutor (the person who's marking it) said she 'hates' flowcharts!so I thought i'd better try another approach :)

        Maybe you should ask her what she likes? Maybe a UML State Machine? It's functionaly quite close to a flow chart but maybe the official stamp of OO aproval would make her happy.

        -sam

Re: Software Design
by beamsack (Scribe) on Apr 27, 2002 at 21:47 UTC
    UML's Sequence Diagrams would provide a great way of illustrating the interaction of your code with the functions provided by the LWP modules. You may have to get creative and liberal with the UML when it comes to illustrating function calls within your own code but you wouldn't be the first to take liberties with UML.
A reply falls below the community's threshold of quality. You may see it by logging in.