简体   繁体   English

构建本地CPAN存储库

[英]Building a local CPAN repository

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. 我想知道Perl中是否有任何选项来构建包含我想要的模块的本地CPAN存储库,然后使用Perl分发重新分发它,然后根本不需要访问CPAN。

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. 我看了CPAN并找到了一个mincpan,但似乎minicpan带来了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? 如果有可能只使用minicpan带来一个特定的模块子集,如果我有一个存储库,是否可以将它复制到另一个具有相同类型的操作系统并在那里安装相关模块而不会头疼?

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.) 请参阅Pinto (管理本地cpan类存储库)或Carton (可以捆绑依赖项并根据需要提供它们,但您必须在部署后在carton下运行您的应用程序。)

Alternatively, instead of a local minimal CPAN distribution, you can bundle requirements with your module, if you use the Module::Install installer. 或者,如果使用Module :: Install安装程序,则可以将需求与模块捆绑在一起 ,而不是本地最小CPAN分发。

The Pinto tools only work on Unix-like machines. Pinto工具仅适用于类Unix机器。 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 ). 但是,Windows用户可以从存储库安装模块,只要他们可以读取文件系统(如NFS)或通过HTTP(使用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. 因此,只要您有一台类似Unix的机器来创建和管理存储库,就可以在Windows上使用Pinto存储库。

Stratopan provides Pinto repositories hosted in the cloud. Stratopan提供托管在云中的Pinto存储库。 With Stratopan, you don't have to install any tools and everything can be managed through the browser. 使用Stratopan,您无需安装任何工具,所有内容都可以通过浏览器进行管理。 You can then install modules anywhere that has internet access using the standard tools. 然后,您可以使用标准工具在任何可以访问Internet的地方安装模块。 Stratopan doesn't yet support all the features Pinto has, but it is the most hassle-free solution for creating a private CPAN. Stratopan还不支持Pinto的所有功能,但它是创建私有CPAN最无障碍的解决方案。

Disclaimer: I operate Stratopan. 免责声明:我经营Stratopan。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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