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

Is there a simpy way or tool for determining the module dependancies of a given script?

Replies are listed 'Best First'.
Re: Module dependancy tree
by steves (Curate) on Feb 09, 2003 at 01:19 UTC

    I've been looking at Module::Dependency but haven't tried it yet. Be my guinea pig? I promise you a vote if you use it and report back to Perl Monks. Oh -- and a chicken in every pot too.

Re: Module dependancy tree
by larsen (Parson) on Feb 09, 2003 at 01:20 UTC
Re: Module dependancy tree
by tall_man (Parson) on Feb 09, 2003 at 21:37 UTC
    I asked a similar question not long ago in Module dependency tool? and was directed to several alternatives:

    Module::Dependency
    Module::ScanDeps
    GraphViz::ISA
    Module::Use

    The first one one the list, Module::Dependency, was so good that I never went on to the others. It recursively scans directories for dependencies among modules and it can produce a dependency graph for any module (as well as ascii text versions). The graphs are a great help to reveal complex circular dependency chains.

    (Note: the EPS output style produced broken Postscript that would not print, but the PNG and JPG styles worked fine.)

Re: Module dependancy tree
by Fletch (Bishop) on Feb 09, 2003 at 01:17 UTC
Re: Module dependancy tree
by Anonymous Monk on Feb 09, 2003 at 01:50 UTC

    Thankyou all. I didn't actually use either of the modules suggested as they each had dependancies of their own I could not satisfy in the target environment, but browsing the source lead me to the follwing one-liner. Added to the bottom of the script in question it temms me what I need to know.

    print "$_\n" for values %INC;