Open miyagawa opened 2 years ago
When you have HTTP-Tiny-0.078.tar.gz
in your mirror index:
➜ cpanm --mirror file://$PWD/vendor/cache --info HTTP::Tiny -v
cpanm (App::cpanminus) 1.7046 on perl 5.034001 built for darwin-2level
Work directory is /Users/miyagawa/.cpanm/work/1654067874.5707
You have make /usr/bin/make
You have LWP 6.66
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
You have /usr/bin/unzip
Searching HTTP::Tiny () on cpanmetadb ...
DAGOLDEN/HTTP-Tiny-0.080.tar.gz
➜ cpanm -M file://$PWD/vendor/cache --info HTTP::Tiny -v
cpanm (App::cpanminus) 1.7046 on perl 5.034001 built for darwin-2level
Work directory is /Users/miyagawa/.cpanm/work/1654067884.5742
You have make /usr/bin/make
You have LWP 6.66
You have /usr/bin/tar: bsdtar 3.5.1 - libarchive 3.5.1 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8
You have /usr/bin/unzip
Searching HTTP::Tiny on mirror file:///tmp/scratch/vendor/cache ...
Downloading index file file:///tmp/scratch/vendor/cache/modules/02packages.details.txt.gz ...
DAGOLDEN/HTTP-Tiny-0.078.tar.gz
We need --mirror-only
(-M) to stop searching for CPAN but that's exactly what this PR disables.
Change the default behavior (configuration option to be added later) to fallback to CPAN if the module doesn't exist in the custom mirror.
TODO:
mirror.t
where you runcarmel install
for the first time (without snapshot) with a custom mirror, you expect to pull the version if it exists in the mirror, but the current implementation pulls the latest from CPAN.