miyagawa/cpanminus — Issue #141: Request for --no-deps option
Author: holybit
Created: 2012-03-01 17:35:37+00:00
State: open

In some perl module install scenarios it is not ideal for cpanm to automatically download dependencies. Let's say I have a list of modules I have defined that I want installed including dependencies. To keep the install fast I only want local modules that are in dist tar.gz files. If a dependency is missing I want cpanm to fail, but the current default is to fetch the missing dependencies.

As an example let's consider MIME::Lite. We know it has depenedencies:

$ cpanm --scandeps --format=dist MIME::Lite
...
RJBS/Email-Date-Format-1.002.tar.gz
MARKOV/MailTools-2.09.tar.gz
MARKOV/MIME-Types-1.34.tar.gz
RJBS/MIME-Lite-3.028.tar.gz

However, if we use cpanm on a local dists dir it will fetch the dependencies
$ cpanm ~/dists/MIME-Lite-3.028.tar.gz
...
==> Found dependencies: Email::Date::Format, Mail::Address, MIME::Types
--> Working on Email::Date::Format
Fetching http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Email-Date-Format-1.002.tar.gz ... OK
...

I would prefer a --no-deps option to override the default:
$ cpanm --no-deps ~/dists/MIME-Lite-3.028.tar.gz
...