What are common pitfalls or gotchas with Dist::Zilla?

When using Dist::Zilla for managing your Perl distribution, there are several common pitfalls and gotchas that you should be aware of. Understanding these issues can help streamline your development process and prevent potential problems down the line.

Common Pitfalls

  • Misconfigured Plugins: Ensure that all plugins are correctly configured. A simple typo can lead to unexpected behavior.
  • Ignoring .gitignore: When initializing a Dist::Zilla project, be cautious about which files are added to version control. Use a proper .gitignore file to exclude unnecessary files.
  • Version Number Management: If you forget to update your version number in your dist.ini file, you may accidentally release the same version twice.
  • Build Environment Differences: Differences between your local build environment and the CI/CD pipeline can lead to unexpected results. Always test in the same environment as your production.

Example Configuration

Below is an example of a simple Dist::Zilla configuration file:

# dist.ini name = My-Module edition = 1.0 author = Your Name <your.email@example.com> [GatherDir] [PruneCruft] [License] [MakeMaker] [Manifest] [Test::Compile] [PkgVersion] [NextRelease] [Git::Commit] [Git::Tag] [UploadToCPAN]

Dist::Zilla Perl package manager pitfalls configuration best practices version control plugins