在哪里可以找到cpanfile格式定义? [英] Where can I find the cpanfile format definition?
问题描述
我们考虑使用 Minilla 或 Dist :: Milla 进行perl开发.声明依赖关系是通过 cpanfile 完成的.我期望找到可以声明什么和如何声明的确切定义.但是
We consider to use Minilla or Dist::Milla for our perl development. Declaring dependencies is done via cpanfile. I expected to find an exact definintion of what and how can be declared. But
-
perldoc cpanfile: 仅显示主要用法. 另请参阅"部分无济于事.
perldoc cpanfile : Shows only the principal usage. 'SEE ALSO' section does not help.
perldoc模块:: CPANfile:与cpanfile相同.
perldoc Module::CPANfile: same as cpanfile.
perldoc cpanfile-faq:仅提供其确切语法的解释或链接
perldoc cpanfile-faq: no explanation of the exact syntax or a link to it, only
熟悉的DSL语法
Familiar DSL syntax
这是一种新的文件类型,但是格式和语法并不是全新的. 它可以声明的元数据恰好是其中的"Prereqs"的子集 CPAN元规范.
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.
语法从Module :: Install大量借鉴. Module :: Install是一个 轻松声明模块元数据(例如名称,作者和 依赖关系. cpanfile格式只是提取依赖项 放入一个单独的文件中,这意味着大多数开发人员 熟悉语法.
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和为什么要使用它
- http://blogs .perl.org/users/lestrrat/2013/03/the-main-problem-with-cpan-modules-on-github.html
- Web : I found ( but does not answer my question )
- 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 的确切描述.语法/格式?
Does anybody know where to find an exact description of the cpanfile syntax/format ?
推荐答案
我安装了
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.htmlThe link in the
cpanfile
manual page is broken. It should point to: http://bundler.io/v1.3/man/gemfile.5.htmlcpanfile
设计为与Module::Install
DSL语法向后兼容"并且可转换为CPAN :: Meta :: Prereqs",并且受CPAN::Meta Spec v.2
等启发.据我了解,
cpanfile
某种程度上是一种元格式",并且适合各种TIMTOWTDI方法(请参阅As I understand it
cpanfile
is somewhat of a "meta-format" and fits into a range of TIMTOWTDI approaches (see miyagawa's blog describingcpanfile
), compatible withModule::Install
and mostly self-documenting. For example if you runmymeta-cpanfile
inside a directory withMETA
files it will build acpanfile
for you; you can write a script that describes prerequisites fromCPAN::Meta::Prereqs
and then$file->save('cpanfile');
to write acpanfile
.关于
Dist::Milla
,在本教程中(请参见Dist::Milla附带的rel ="noreferrer">POD
) 如果决定手动构造[a]新的cpanfile
,则该格式大部分与Module::Install
的要求DSL兼容".本教程还给出了一个简短的示例.As for
Dist::Milla
, in the tutorial (see thePOD
included withDist::Milla
) miyagawa points out that "If you decide to manually construct [a] newcpanfile
, the format is mostly compatible toModule::Install
's requirement DSL". The tutorial also gives a short example.我认为请宫川来澄清
分发文档中的规范/格式 .那和另外一些示例将回答像您这样的问题.他已经完成了大部分工作-并非只在一个地方. I think it would be fair to ask miyagawa to clarify the status and use cases of the
cpanfile
specification/format in the documentation for the distribution. That and a few more examples would answer questions like yours. He has mostly done the work on this already - it is just not all in one place.这篇关于在哪里可以找到cpanfile格式定义?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!