I'm setting up a CPAN::Mini mirror and I want to be able to download multiple versions of modules from the mirror. How do I get it to index more that the latest version of modules I inject:
$ mcpani -v --add --module Foo --authorid DUMMY --modversion 0.001 --file Foo/Foo-0.001.tar.gz
$ mcpani -v --add --module Foo --authorid DUMMY --modversion 0.002 --file Foo/Foo-0.002.tar.gz
$ mcpani -v --update
such that I can do:
$ cpanm -M ~/CPAN [email protected]
NOTE:
The different versions of the module are present within the mirror:
$ find ~/CPAN -name 'Foo-0.00[12].tar.gz'
~/CPAN/authors/id/D/DU/DUMMY/Foo-0.001.tar.gz
~/CPAN/authors/id/D/DU/DUMMY/Foo-0.002.tar.gz
Even if I edit the index file by hand, only the first one listed is available for download:
$ zgrep '^Foo\s' ~/CPAN/modules/02packages.details.txt.gz
Foo 0.002 D/DU/DUMMY/Foo-0.002.tar.gz
Foo 0.001 D/DU/DUMMY/Foo-0.001.tar.gz
I have used CPAN::Mini::Inject in my examples here but I have tried the following with the same outcome: