加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl – 在哪里可以找到cpanfile格式定义?

发布时间:2020-12-15 21:33:41 所属栏目:大数据 来源:网络整理
导读:我们考虑使用Minilla或Dist :: Milla进行perl开发.声明依赖是通过 cpanfile完成的.我预计会找到一个确切的定义.但 perldoc cpanfile: 仅显示主要用途. “另请参阅”部分没有帮助. perldoc Module :: CPANfile:与cpanfile相同. perldoc cpanfile-faq:没有
我们考虑使用Minilla或Dist :: Milla进行perl开发.声明依赖是通过 cpanfile完成的.我预计会找到一个确切的定义.但

> perldoc cpanfile:
仅显示主要用途. “另请参阅”部分没有帮助.
> perldoc Module :: CPANfile:与cpanfile相同.
> perldoc cpanfile-faq:没有解释确切的语法或链接,只有

Familiar DSL syntax

This is a new file type,but the format and syntax isn’t entirely new.
The metadata it can declare is exactly a subset of “Prereqs” in
CPAN Meta Spec.

The syntax borrows a lot from Module::Install. Module::Install is a
great way to easily declare module metadata such as name,author and
dependencies. cpanfile format is simply to extract the dependencies
into a separate file,which means most of the developers are
familiar with the syntax.

>网:我发现(但不回答我的问题)

> https://speakerdeck.com/miyagawa/cpanfile
> http://weblog.bulknews.net/post/44963580392/what-is-cpanfile-and-why-do-i-want-to-use-it
> http://blogs.perl.org/users/lestrrat/2013/03/the-main-problem-with-cpan-modules-on-github.html

有没有人知道在哪里找到cpanfile语法/格式的确切描述?

解决方法

我安装了 Module::CPANFile和perldoc cpanfile和perldoc cpanfile-faq可用.

cpanfile的POD表示:

[the] cpanfile specification (this document) is based on Ruby's
Gemfile http://gembundler.com/man/gemfile.5.html specification.

cpanfile手册页面中的链接已损坏.应该指出:http://bundler.io/v1.3/man/gemfile.5.html

cpanfile旨在通过Module::Install DSL语法“向后兼容”,并且可以转换为CPAN :: Meta :: Prereqs,并受到CPAN :: Meta Spec v.2等的启发.

据了解,cpanfile有些是“元格式”,适合于一系列TIMTOWTDI方法(参见miyagawa’s blog describing cpanfile),与Module :: Install兼容,大部分是自我记录.例如,如果您在META文件的目录中运行mymeta-cpanfile,它将为您构建一个cpanfile;您可以编写一个描述CPAN :: Meta :: Prereqs,然后$file-> save(‘cpanfile’)的先决条件的脚本;写一个cpanfile.

至于Dist :: Milla,在教程中(参见Dist :: Milla中的POD),miyagawa指出
“如果您决定手动构建新的cpanfile,该格式大多与Module :: Install的DSL要求兼容.本教程还提供了一个简短的例子.

我认为miyagawa要在分发文件中澄清cpanfile规范/格式的状态和用例是公平的.那几个例子可以回答像你这样的问题.他已经做了大部分工作 – 这不仅仅是在一个地方.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读