如何在 Raku 中指定一个 github 仓库作为模块的依赖源?

How to specify a github repo as the source of dependency of a module in Raku?

我的模块依赖于 Fcntl 模块 (https://github.com/manchicken/perl6-Fcntl), which hasn't been updated in a long time and is broken. However, there's a fork (https://github.com/jonathanstowe/perl6-Fcntl),如果我手动 zef install 它对我有用。是否可以在我的模块的 META-6.json 中指定依赖关系,以便使用正确的 github 存储库来安装模块?

不,您不能将 uri 列为依赖项。该规范实际上指出 META6.json 中的依赖项名称应该与您 use.

中的名称相匹配

如果您坚持不将命名空间集成到众多合作生态系统之一,那么您仍然可以在安装说明中自由列出 url:

zef install MyModule https://github.com/foo/dependency.git

当用户向 zef 提供 uri 时,它基本上被视为 stand-alone 生态系统,因此能够满足 MyModule 的依赖关系。这没关系——user 明确请求使用该来源。 模块作者 指定从何处下载依赖项(仅需要哪些依赖项)是不可行的。

所有这些都表明您可以用不同的方式解决您的问题 -- 分叉模块,将 auth 字段更改为其他内容,列出(和 useFcntl:auth<mynewauth> 作为依赖项名称,然后将您的分支添加到生态系统中。或者你可以直接修改版本 so-to-speak.