miyagawa/cpanminus — pull request #321 by dayflower (2013-09-19 13:24:35+00:00)
Title: Options for downloading dists into specified directory (so that dists are reusable)

Current cpanm downloads dists to cpanm working directory.
The working directory changes on every cpanm invocations, so dist files are not shared between other cpanm sessions, downloaded every time.

This patch contains two new options, '--cache-dir' and '--trust-cache'.
'--cache-dir' option represents dist download directory.
Without '--trust-cache', dist file will be retrieved with If-Modified-Since header (when backend if LWP) if file exists.
With '--trust-cache', dist file will not be fetched if exists (any backends).