简体   繁体   中英

How can I exclude a module from a minicpan repository?

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?

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.

不过滤模块最初工作?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM