How can I exclude a module from a minicpan repository?

763 views Asked by At

I have a local MINICPAN repository, but I want to remove a specific version of a module, and inject an older version.

This is the steps I've taken.

- create the MINICPAN, not filtering any modules
- use mcpani --add for the module in question
- use mcpani --inject

At this point, I can see in the MINICPAN that it has both the version I want, and the newer version, if I issue install in cpan, then the newer version of the module is install. How can I get rid of the newer version from my minicpan?

3

There are 3 answers

1
brian d foy On BEST ANSWER

Filter the modules that you are going to inject. The CPAN::Mini has the documentation for filtering, and I think I had some examples in the resources I pointed you toward earlier. :)

If you already have the minicpan, as you said in the comment to ysth, you can create another minicpan from that one. The "remote" CPAN in that case is the one that you have. I do that all the time: I have a canonical minicpan, but then for testing things, I filter from that to create new repositories just so I don't have to deal with the network.

0
Jeffrey Ryan Thalhammer On

Another strategy would be to use Pinto. Unlike a minicpan, a Pinto repository contains only the distributions you want (and their dependencies), so there is no need for filtering. This results in a much smaller and more manageable pile of files, so you can easily do things like check it into your SCM. Pinto also has some neat tools for handling upgrades without accidentally breaking your application.

Also, Stratopan hosts Pinto repositories in the cloud. You can manage the repository through your browser and install modules anywhere that has internet access. It doesn't yet support all the features Pinto has, but Stratopan really takes the hassle out of maintaining a local CPAN.

Disclaimer: I operate Stratopan.

1
ysth On

Doesn't filtering out the module initially work?