Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Generate UML from Perl code?

by marvi (Sexton)
on Aug 06, 2001 at 03:59 UTC ( #102364=perlquestion: print w/replies, xml ) Need Help??

marvi has asked for the wisdom of the Perl Monks concerning the following question: (object-oriented programming)

Is there a tool that generates UML diagrams from Perl source code?

Originally posted as a Categorized Question.

Replies are listed 'Best First'.
Re: Generate UML from Perl code?
by Zaxo (Archbishop) on Aug 06, 2001 at 04:20 UTC
Re: Generate UML from Perl code?
by htoug (Deacon) on Aug 06, 2001 at 10:23 UTC
    Simon Johnston <> has written a Perl AddIn for Rose. He talked about it at TPC4. You can find it at:
Re: Generate UML from Perl code?
by bikeNomad (Priest) on Aug 06, 2001 at 21:10 UTC
    The code I posted at Graph your Perl inheritance structure will draw an inheritance diagram from an existing Perl program. You should be able to modify it to make UML diagrams pretty easily. But you won't be able to edit them graphically.

    But you don't say what UML diagrams you're interested in (there are lots of different kinds). Some possibilities that I can think of for diagramming:

    • use the debugger hooks to build a sequence or collaboration diagram
    • analyze the @ISA structure for a class diagram like my example does
    • analyze your POE structures for a class diagram
    • analyze the 'use' and 'require' structures (you can use the debugger hooks here too) for a component diagram
Re: Generate UML from Perl code?
by stajich (Chaplain) on May 20, 2002 at 13:47 UTC
    Another good option is AutoDia which will produce XML suitable for the Dia drawing program. Typically you'll need to so some editing of the diagram after generation, but it seems to get the inheritance down okay. I like it as a starting point rather than building the whole class hierarchy by hand.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (1)
As of 2023-05-31 22:46 GMT
Find Nodes?
    Voting Booth?

    No recent polls found