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

Hi there, I just started a new job and most of the code is OO, which I'm less familiar with. I was wondering if anyone knows of a script that can generate a graphical model that looks at all used modules/classes and their subsequent parents (and may even list their methods), for any particular perl file. Thanks

Replies are listed 'Best First'.
Re: generating an inheritance model
by jeffa (Bishop) on Nov 13, 2008 at 19:09 UTC
      Thanks Mate. This works beautifully! I downloaded Autodia::Handler::Perl from CPAN and then viewed the outputed XML file in Dia. Dan PS thanks to all for their prompt responses
Re: generating an inheritance model
by MidLifeXis (Monsignor) on Nov 13, 2008 at 19:13 UTC

    I have used NaturalDocs before. I cannot remember if it reads the structure directly or if you need specially formatted comments. I also have not used the latest copy.

    Update: Yes, this does parse the syntax tree (at least for class / method / variable structures), as well as specially formatted documentation in the comments.

    --MidLifeXis

Re: generating an inheritance model
by LanX (Saint) on Nov 13, 2008 at 19:35 UTC
      reading your question again ... it may be sufficent only use Module::ScanDeps and to visualize the result with graphviz.