NAME

Dist::Zilla::Plugin::CopyMakefilePLFromBuild - Copy Makefile.PL after building (for SCM inclusion, etc.)

VERSION

version 0.0019

SYNOPSIS

In your Dist::Zilla dist.ini:

[CopyMakefilePLFromBuild]

DESCRIPTION

CopyMakefilePLFromBuild will automatically copy the Makefile.PL from the build directory into the distribution directory. This is so you can commit the Makefile.PL to version control. When building directly from GitHub (via cpanm, for example) you would need a Makefile.PL

Dist::Zilla will not like it if you already have a Makefile.PL, so you'll want to prune that file, an example of which is:

[GatherDir]     ; gathers files - including Makefile.PL
[PruneFiles]    ; removes some files
filenames = Makefile.PL
[MakeMaker]     ; generates your Makefile.PL for the build dir
[CopyMakefilePLFromBuild] ; copies the generated Makefile.PL back

AfterBuild/AfterRelease

With the release of 0.0016, this plugin changed to performing the copy during the AfterRelease stage instead of the AfterBuild stage. To enable the old behavior, set the environment variable DZIL_CopyFromBuildAfterBuild to 1:

$ DZIL_CopyFromBuildAfterBuild=1 dzil build 

AUTHOR

Robert Krimen <robertkrimen@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2011 by Robert Krimen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.