Dist::Zilla::Plugin::Substitute - Substitutions for files in dzil
version 0.007
[Substitute] finder = :ExecFiles code = s/Foo/Bar/g ; alternatively [Substitute] file = lib/Buz.pm code = s/Buz/Quz/g filename_code = s/Buz/Quz/
This module performs substitutions on files in Dist::Zilla.
An arrayref of lines of code. This is converted into a sub that's called for each line, with $_ containing that line. Alternatively, it may be a subref if passed from for example a pluginbundle. Mandatory.
$_
Either lines(the default) or whole. This determines if the substitution is done per line or per whole file.
lines
whole
Like content_code but the resulting sub is called for the filename. Optional.
content_code
The finders to use for the substitutions. Defaults to :InstallModules, :ExecFiles. May also be spelled as finder in the dist.ini.
:InstallModules, :ExecFiles
finder
The files to substitute. It defaults to the files in finders. May also be spelled as file in the dist.ini.
finders
file
# vim: ts=4 sts=4 sw=4 noet :
Leon Timmermans <leont@cpan.org>
This software is copyright (c) 2013 by Leon Timmermans.
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::Plugin::Substitute, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::Substitute
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::Substitute
For more information on module installation, please visit the detailed CPAN module installation guide.