Tatsuhiko Miyagawa's Blog

Freeze CPAN deps with PAUSE git

April 24, 2013

Link: Freeze CPAN deps with PAUSE git

PAUSE is the backend of CPAN module upload server, and since April 2012, thanks to rjbs, for every perl module upload, it commits the index list (as well as author/permission mapping). And now it is available on github. Thanks Andreas!

This makes it so easy to freeze CPAN module dependencies for your application solely based on time.

First, check out the repo, and then specify the revision with date time you want to freeze at:

git clone git://github.com/batchpause/PAUSE-git.git
cd PAUSE-git
git checkout git rev-list -n 1 --before "2013-01-01 00:00" masterThen, refernce that 02packages from cpanm:

cpanm –installdeps . \
–mirror-index /path/to/PAUSE-git/02packages.details.txt
–mirror http://backpan.perl.org/That’s it, really.

If you want more control over versions, dev releases and git forks, you might need Carton. And you can only go back to 2012 April and no older than that. But for a simple time-based index, this is all you need.