NAME

Dist::Zilla::Plugin::DBIO::VersionLockstepTest - Generate xt/author/version-lockstep.t, a gate that every module carries the main module's version

VERSION

version 0.900004

DESCRIPTION

Gathers an xt/author/version-lockstep.t test that reads the literal $VERSION of the main module and of every .pm under lib/ of the built distribution, and fails when a module has none or a different one. Each deviating module is named with the version it carries.

It exists for the core distribution (core = 1 in the bundle). Drivers version every module through RewriteVersion::Transitional, which rewrites them in lockstep on release. Core only reads the version from the main module (Dist::Zilla::Plugin::VersionFromMainModule) and writes nothing, so a module left behind at a version bump would install with a stale $VERSION and nothing would notice. This test notices.

The main module is the one Dist::Zilla reports for the distribution at build time; its path is written into the generated test. A run that finds no module to check fails rather than passing on nothing.

[ExtraTests] promotes the file to t/author-version-lockstep.t, guarded by AUTHOR_TESTING: it runs under dzil test and dzil release, and is skipped when the distribution is merely installed. It needs nothing beyond core Perl.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

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