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

Dear Wise Monks,

I am trying to track the module dependencies for a large perl project (e.g. package ABC uses package DEF uses...). I was hoping to find or create an automatic tool to do this, similar to the "cdep" tool that John Lakos made in Large-Scale C++ Software Design.

I set up a miminal package, referring to another minimal package:

package ABC; use DEF; 1;
I thought perhaps something like this would work:
perl -MO=Xref,-oreport ABC.pm grep -w Package report | grep -v '(' | sort -u > dep_report
However, all I get is:
Package attributes Package UNIVERSAL
Is there a better tool available to find the module "use" dependencies? Thanks for your help.

Replies are listed 'Best First'.
Re: Module dependency tool?
by Aristotle (Chancellor) on Jan 26, 2003 at 00:10 UTC
      My apologies. I did a Super Search in perlmonks itself, but missed it on CPAN.
Re: Module dependency tool?
by PodMaster (Abbot) on Jan 26, 2003 at 06:52 UTC
    Module::ScanDeps is an alternative. It looks to find the minimum available dependencies. It's useful in tools like PAR and App::Packer and the like.


    MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
    ** The Third rule of perl club is a statement of fact: pod is sexy.

Re: Module dependency tool?
by tomhukins (Curate) on Jan 26, 2003 at 19:43 UTC
Re: Module dependency tool?
by ihb (Deacon) on Jan 27, 2003 at 00:05 UTC