使用DIST :: Zilla从Perl模块释放中排除目录



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

我尝试使用https://metacpan.org/pod/dist:: zilla:: plugin :: gatherdir

我尝试指定[gathydir]部分,但这与@basic相矛盾,所以在我的 dist.ini中,我现在有(完整文件:https://github.com/telatin/fastq-parser/fastq-parser/fastq-parser/blob/master/dist.ini(:

[@Basic]
prune_directory = experimental

使用dzil build --verbose构建时,我的所有行都如下:

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

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

我该怎么办?

@Basic插件捆绑包无法将选项传递给其使用的插件。因此,您必须首先使用@filter捆绑包从中删除GatherDir插件,然后将GatherDir与额外的选项一起使用。

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

另一个选项是使用@configslicer捆绑包来修改插件@Basic直接使用。

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

(在这种情况下,[]是因为通过config :: slicer设置多价选项需要指示它是多值。有关详细信息,请参见文档。(

考虑@Starter Bundle,这是@Basic的现代化版本,默认情况下允许-remove和配置切片选项,以及基于Modern Dist :: Zilla练习的许多其他改进和选项。

最新更新