NAME

Dist::Zilla::Plugin::CopyFilesFromBuild::Filtered - Copy files from build directory, but filter out lines

VERSION

version 0.002

SYNOPSIS

[CopyFilesFromBuild::Filtered]
copy = Makefile.PL

[CopyFilesFromBuild::Filtered]
copy = whatever.txt
filter = #.*whatever.*

DESCRIPTION

This module copies files from the build directory to the source directory, but filters out lines from the copied file. It is designed in particular for generated *.PL files, which often have unwanted "generated by" comments that cause unwanted file churn under source control.

ATTRIBUTES

copy

Specifies files to be copied from the build directory back to the distribution source. May be given multiple times.

filter

A regular expression given as string. Any matching lines in copied files will be filtered out of the copy. It will be applied as follows:

s{^$filter\n}{}mg

Thus, it is anchored at the start of a line to the newline at the end.

The default matches a comment with "generated by" as found in typical generated *.PL files: #.*generated by.*

SEE ALSO

SUPPORT

Bugs / Feature Requests

Please report any bugs or feature requests through the issue tracker at https://github.com/dagolden/Dist-Zilla-Plugin-CopyFilesFromBuild-Filtered/issues. You will be notified automatically of any progress on your issue.

Source Code

This is open source software. The code repository is available for public review and contribution under the terms of the license.

https://github.com/dagolden/Dist-Zilla-Plugin-CopyFilesFromBuild-Filtered

git clone https://github.com/dagolden/Dist-Zilla-Plugin-CopyFilesFromBuild-Filtered.git

AUTHOR

David Golden <dagolden@cpan.org>

CONTRIBUTOR

David Golden <xdg@xdg.me>

COPYRIGHT AND LICENSE

This software is Copyright (c) 2015 by David Golden.

This is free software, licensed under:

The Apache License, Version 2.0, January 2004