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

Hi Monks,

I am in a secured deveopment environment where I do not have access to PPM|CPAN repositories. All I have is a local website containing modules for offline installation. As you all aware i run into the dependency hell when I install any module. Is there any tool or method to find all the dependentent modules?

I googled for solution to scenario. Some one suggested to look at META.yml but it does not solve my problem as it list the dependent for that particular module. I want to recursivly find ALL the prerequisites.


Can anyone help me out with you input?

Thanks in Advance.
  • Comment on Finding Dependency of ann Module before offline installation

Replies are listed 'Best First'.
Re: Finding Dependency of ann Module before offline installation
by Marshall (Canon) on Feb 15, 2012 at 07:44 UTC
    for ppm:
    ppm tree *package*
    ppm tree *num*
    Shows all the dependencies (recusively) for a particular package.

    May be of help?
    also look at the the ppm profile command.

    Update:
    I found this in the cpan FAQ: How do I find out what modules are already installed on my system?

    I did play around a bit with the ppm tree command. I'm not so sure how helpful this will be as a general strategy because:
    (a) it reports things that really aren't other installable packages (e.g things that are already part of standard Perl) and,
    (b) You will have to parse the output to get a "flat list" of all of the packages.

    I suspect that a more productive idea is to first install what you need on some reference system outside of this secure environment. Then, look at all of the packages that are installed (one package install may and probably did result in additional package installations) and implement a procedure such that all of the installed packages on the reference system are available on the non-internet connected system's repository. That way it doesn't matter which package needs what other package.

    I guess there could be trouble if the reference system has a lot of installed stuff that the secured system doesn't actually need to run the deployed programs. But that's why I'm using the term "reference system" instead of "user's development station".

    But the basic idea is instead of predicting what will happen and what you will need, actually do an installation on an internet connected machine. Then compare the difference between what is installed on sysA vs sysB and that difference accounts for any dependencies.

Re: Finding Dependency of ann Module before offline installation
by Anonymous Monk on Feb 15, 2012 at 16:19 UTC