Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add custom module distributions to my local CPAN mirror?

Tags:

perl

cpan

dpan

I'm getting ready to set up a full CPAN mirror for internal use at my company. However, we have several internal Module::Build based distributions that I'd like to make available to people from this mirror. These distributions should ONLY be available from our mirror; they are internal libraries only. Essentially, once people have set up their CPAN config file to load "cpan.mycompany.com' mirror, I'd like them to be able to do a

cpan install MyCompany::Bundle
cpan install MyCompany::Other::Module

On their command line to install any number of internal, custom module distributions. Ideally, as versions of these module distributions are incremented, all of those versions would be indexed by our internal CPAN mirror and made available, just as as previous versions of CPAN modules are made available.

After the initial question, I was able to come up with some other possibilities.

There's CPAN::Inject, but it looks like I can't use it to get a cpan install My::Module syntax.

Then there's MyCPAN::App::DPAN, which also looks interesting, and almost looks like what I need. Does anyone have experience with this tool?

Another one I just came across was CPAN::Site. This seems to also be able to set up a custom CPAN distribution. Any thoughts on this tool?

like image 941
Robert P Avatar asked Oct 20 '25 14:10

Robert P


2 Answers

If you're using CPAN::Mini to create your mirror, then you use CPAN::Mini::Inject to add your own modules to it.

like image 168
cjm Avatar answered Oct 22 '25 04:10

cjm


To do this with a full CPAN mirror, CPAN::Site covers this nicely. It lets you make a mirror, and then inject your own libraries right into it, complete with tools to help you manage setting it up and keeping it up to date.

like image 30
Robert P Avatar answered Oct 22 '25 05:10

Robert P



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!