How to install local tar file dependencies together with dependencies from CPAN?

847 views Asked by At

Let's assume there is a distribution "Example" that is packed in example-1.0.tar.gz which contains a Makefile.PL that points to all dependencies. After extracting, "Example" could be easily installed (including all its dependencies) by calling cpanm . if all its dependencies were available on CPAN.

How do I install a simialar file (let's call it example-2.0.tar.gz) if I am given a folder "deps" containing most of the distribution's dependencies

  • dependency-1.tar.gz
  • dependency-2.tar.gz
  • ...
  • dependency-N.tar.gz

where N is a huge number?

Further assumptions are:

  • dependency-*tar.gz files have to be preferred over the available CPAN modules
  • some dependencies are not available on CPAN but only in this "deps" folder
  • the folder "deps" is incomplete and further dependencies have to be installed from CPAN.

Is there a simple way to install example-2.0.tar.gz?

I would like to know if there is some command line like cpanm --use-local-deps=~/deps example-2.0.tar.gz which does not need further workarounds.

1

There are 1 answers

0
Kim Ryan On

You could use this tool http://search.cpan.org/~bingos/CPANPLUS-0.9152/bin/cpan2dist . It lets you specify filters to define what modules are loaded locally and what is fetched from CPAN. It's part of the CPANPLUS module, which should cone with newer versions of Perl I think.