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

Is there some quick way to find all the other modules a given module requires (recursively descending through all dependencies)?
  • Comment on recursively finding all perl module dependencies

Replies are listed 'Best First'.
Re: recursively finding all perl module dependencies
by educated_foo (Vicar) on May 22, 2002 at 04:45 UTC
    I haven't tried it, but a quick search on CPAN yielded Module::Dependency::Info, which sounds like it might do what you want. It can't get everything, since it's possible to hide dependencies inside an eval, but it will probably be better than the recursively-grepping home-brew script I use to do this.

    Out of curiosity, what are you using this for? My little experiment grew out of an attempt to merge POD from required modules into one gargantuan page.

    /s

Re: recursively finding all perl module dependencies
by tomhukins (Curate) on May 22, 2002 at 10:30 UTC
Re: recursively finding all perl module dependencies
by dada (Chaplain) on May 22, 2002 at 17:13 UTC
    if you don't care about the dependencies hierarchy, this one-liner reports the whole stuff (change LWP for the module you want to inspect):
    perl -MLWP -e 'print join("\n", keys %INC), "\n";'
    cheers,
    Aldo
    __END__ $_=q,just perl,,s, , another ,,s,$, hacker,,print;