Dist::Zilla::Plugin::GatherDir::Template - gather all the files in a directory and use them as templates
version 6.017
This is a subclass of the GatherDir plugin. It works just like its parent class, except that each gathered file is processed through Text::Template.
The variables $plugin and $dist will be provided to the template, set to the GatherDir::Template plugin and the Dist::Zilla object, respectively.
$plugin
$dist
It is meant to be used when minting dists with dzil new, but could be used in building existing dists, too.
dzil new
Use this to rename files while they are being gathered. This is a list of key/value pairs, specified thus:
[GatherDir::Template] rename.DISTNAME = $dist->name =~ s/...//r rename.DISTVER = $dist->version
This example will replace the tokens DISTNAME and DISTVER with the expressions they are associated with. These expressions will be treated as though they were miniature Text::Template sections, and hence will receive the same variables that the file itself receives, i.e. $dist and $plugin.
DISTNAME
DISTVER
Ricardo SIGNES 😏 <rjbs@cpan.org>
This software is copyright (c) 2020 by Ricardo SIGNES.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla
CPAN shell
perl -MCPAN -e shell install Dist::Zilla
For more information on module installation, please visit the detailed CPAN module installation guide.