CPAN要求文件

编程入门 行业动态 更新时间:2024-10-25 15:28:55
本文介绍了CPAN要求文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

使用pip,您可以创建需求文件以指定要安装的库.使用CPAN的perl模块是否等效?

With pip you are able to create a requirements file to specify which libraries to install. Is there an equivalent for perl modules using CPAN?

我遇到过ExtUtils :: MakeMaker,但这似乎是make文件专门针对每个模块的.

I came across ExtUtils::MakeMaker, but this seems like the make file is for each module specifically.

我想尝试更好地了解我要问的是是否有一种方法可以做类似的事情

I guess to try and give a better idea of what I am asking is if there is a way to do something like

cpan install -r requirements.txt

,然后在该需求文件中指定要安装的模块.

and then specify which modules to install in that requirements file.

提前谢谢!

推荐答案

我认为您正在寻找Carton.

I think Carton is what you're looking for.

要开始使用纸箱,请先安装它.然后使用您的依赖项创建一个cpanfile:

To start using Carton, install it. Then create a cpanfile with your dependencies:

require 'Test::Most'; require 'Math::BaseConvert';

在放置此文件后,运行

carton install

这将在必要时安装这些模块,并编写一个名为cpanfile.snapshot的文件,其中包含相关性信息.

This will install those modules, if necessary, and write a file called cpanfile.snapshot with dependency information.

另请参阅:使用Carton管理Perl依赖关系的简要说明

PS:检查Stratopan.

PS: Check out Stratopan.

更多推荐

CPAN要求文件

本文发布于:2023-06-04 08:36:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/493371.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件   CPAN

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!