Skip to content

Commit

Permalink
rename copyfiles to copy_files
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Jun 19, 2016
1 parent 197035a commit f3d2206
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -4,6 +4,7 @@
[Features]
- 'bumpversions' moved to 'bump_versions', but legacy interface retained.
- 'srcreadme' moved to 'src_readme' but legacy interface retained.
- 'copyfiles' moved to 'copy_files' but legacy interface retained.

2.025010 2015-11-15T02:28:17Z f61f784
- Provision more files during minting instead of relying on generation on the first invocation of `dzil build`
Expand Down
8 changes: 4 additions & 4 deletions README.mkdn
Expand Up @@ -197,18 +197,18 @@ Determines which tooling to generate the distribution with
If true, use `[BumpVersionAfterRelease]` and `[RewriteVersions::Sanitized]` instead of `[PkgVersion]` and
`[Git::NextVersion::Sanitized]`

## `copyfiles`
## `copy_files`

An array of files generated by `Dist::Zilla` build to copy from the built dist back to the source dist

If not specified, the default contents are as follows:

copyfiles = LICENSE
copyfiles = Makefile.PL
copy_files = LICENSE
copy_files = Makefile.PL

These defaults can be wiped with:

copyfiles = none
copy_files = none

## `src_readme`

Expand Down
26 changes: 14 additions & 12 deletions lib/Dist/Zilla/PluginBundle/Author/KENTNL.pm
Expand Up @@ -46,12 +46,13 @@ See L<< the C<PluginBundle> role|Dist::Zilla::Role::PluginBundle >> for what thi
=cut

sub mvp_multivalue_args { return qw( auto_prereqs_skip copyfiles ) }
sub mvp_multivalue_args { return qw( auto_prereqs_skip copy_files ) }

sub mvp_aliases {
return {
'bumpversions' => 'bump_versions',
'srcreadme' => 'src_readme',
'copyfiles' => 'copy_files',
};
}

Expand Down Expand Up @@ -268,22 +269,22 @@ has 'bump_versions' => (
default => sub { undef },
);

=attr C<copyfiles>
=attr C<copy_files>
An array of files generated by C<Dist::Zilla> build to copy from the built dist back to the source dist
If not specified, the default contents are as follows:
copyfiles = LICENSE
copyfiles = Makefile.PL
copy_files = LICENSE
copy_files = Makefile.PL
These defaults can be wiped with:
copyfiles = none
copy_files = none
=cut

has copyfiles => (
has copy_files => (
is => ro =>,
isa => 'ArrayRef[ Str ]',
lazy => 1,
Expand Down Expand Up @@ -413,11 +414,12 @@ sub _none_match {
sub _configure_basic_files {
my ($self) = @_;
my (@ignore_files) = qw( README README.mkdn README.pod CONTRIBUTING.pod );
my (@copyfiles) = ();
if ( _none_match 'none', @{ $self->copyfiles } ) {
push @copyfiles, @{ $self->copyfiles };
my (@copy_files) = ();

if ( _none_match 'none', @{ $self->copy_files } ) {
push @copy_files, @{ $self->copy_files };
}
push @ignore_files, @copyfiles;
push @ignore_files, @copy_files;

$self->add_plugin(
'Git::GatherDir' => {
Expand All @@ -440,8 +442,8 @@ sub _configure_basic_files {
},
);

if (@copyfiles) {
$self->add_named_plugin( 'CopyXBuild' => 'CopyFilesFromBuild', { copy => [@copyfiles] } );
if (@copy_files) {
$self->add_named_plugin( 'CopyXBuild' => 'CopyFilesFromBuild', { copy => [@copy_files] } );
}

return;
Expand Down

0 comments on commit f3d2206

Please sign in to comment.