4

我不想发布的 Perl 模块根目录中有一个子目录。

我尝试使用https://metacpan.org/pod/Dist::Zilla::Plugin::GatherDir的“prune_directory”或“exclude_file”属性

我试图指定 [GatherDir] 部分,但这与@Basic 重复,所以在我dist.ini现在有(完整文件:https ://github.com/tellatin/FASTQ-Parser/blob/master/dist.ini ):

[@Basic]
prune_directory = experimental

dzil build --verbose我一起构建时,所有行如下:

[@Basic/GatherDir] adding file experimental/scripts/my.pl

所以确实添加了我要修剪的目录。

我该怎么办?

4

1 回答 1

5

@Basic插件包不能将选项传递给它使用的插件。因此,您必须首先使用@FilterGatherDir包从中删除插件,然后再使用额外的选项。GatherDir

[GatherDir]
prune_directory = experimental

[@Filter]
-bundle = @Basic
-remove = GatherDir

另一种选择是使用@ConfigSlicer包直接修改插件@Basic使用。

[@ConfigSlicer]
-bundle = @Basic
GatherDir.prune_directory[] = experimental

[]在这种情况下是因为通过 Config::Slicer 设置多值选项需要指示它是多值的。有关详细信息,请参阅文档。)

考虑@Starter包,它的现代化版本默认@Basic允许-remove和配置切片选项,以及基于现代 Dist::Zilla 实践的许多其他改进和选项。

于 2019-05-16T14:48:29.510 回答