3

I wonder if there are any options in Perl to build a local CPAN repository including the modules I want and then redistribute it with Perl distribution and then do not need to access CPAN at all.

If yes, could some me show an example?

I looked on CPAN and found a mincpan but it seems that minicpan bring all the mirror of CPAN. If it's possible to bring only a specific subset of modules using minicpan and in case I have a repository is it possible to copy it to another OS with the same type and install the relevant modules there with no headaches?

oalders
  • 5,239
  • 2
  • 23
  • 34
user3019319
  • 326
  • 3
  • 9

3 Answers3

6

See Pinto (manages a local cpan-like repository) or Carton (can bundle up dependencies and provide them as needed, but you must run your application under carton after deployment.)

Alternatively, instead of a local minimal CPAN distribution, you can bundle requirements with your module, if you use the Module::Install installer.

ysth
  • 96,171
  • 6
  • 121
  • 214
  • Ok thansk could you provide an example how to use them on pointing me to bignner tutorial how to use each of them thanks – user3019319 Dec 01 '13 at 18:01
  • updated pinto link; I don't know of any tutorials, but each link has enough documentation to get you started. – ysth Dec 01 '13 at 18:06
  • Ok thanks just I want to ask you if Pinto works on windows ?and if yes and i build my repository using pinto and have all the modules i need how can i distribute it to more than one client are there other tools or i need only to copy the repository ? – user3019319 Dec 01 '13 at 18:52
  • no idea about windows; I believe you can copy the repository files. – ysth Dec 01 '13 at 18:59
2

The Pinto tools only work on Unix-like machines. However, Windows users can install modules from the repository as long as they can read the filesystem (like with NFS) or reach the host via HTTP (using pintod). So it is possible to use a Pinto repository with Windows, so long as you have one Unix-like machine to create and manage the repository.

Stratopan provides Pinto repositories hosted in the cloud. With Stratopan, you don't have to install any tools and everything can be managed through the browser. You can then install modules anywhere that has internet access using the standard tools. Stratopan doesn't yet support all the features Pinto has, but it is the most hassle-free solution for creating a private CPAN.

Disclaimer: I operate Stratopan.

  • Almost 10 years later, this appears to be no longer maintained? At the very least, the certificate installed in stratopan.com expired in May 2020, which is now 3 years ago. – Wouter Verhelst Jul 03 '23 at 10:06
0

This is addressed by How to mirror CPAN

Borodin
  • 126,100
  • 9
  • 70
  • 144