Dist::Zilla::Plugin::Prereqs::SyncVersions - (DEPRECATED) Homogenize prerequisites so dependency versions are consistent
version 0.003002
This module is deprecated as equivalent behavior is now part of Dist::Zilla.
Dist::Zilla
However, this module will keep maintained for anyone who wants this behavior without upgrading to DZil 5
DZil 5
; <bunch of metaprereq providing modules> [Prereqs::SyncVersions]
Note: This must come after packages that add their own prerequisites in order to work as intended.
This module exists to pose mostly as a workaround for potential bugs in downstream tool-chains.
Namely, CPAN.pm is confused when it sees:
CPAN.pm
runtime.requires : Foo >= 5.0 test.requires : Foo >= 6.0
It doesn't know what to do.
This is an easy enough problem to solve if you're using [Prereqs] directly, and [AutoPrereqs] already does the right thing, but it gets messier when you're working with plugins that inject their own prerequisites
[Prereqs]
[AutoPrereqs]
So this plugin will homogenize dependencies to be the same version in all phases which infer the dependency, matching the largest one found, so the above becomes:
runtime.requires : Foo >= 6.0 test.requires : Foo >= 6.0
mvp_multivalue_args
The following attributes exist, and may be specified more than once:
applyto applyto_relation applyto_phase
register_prereqs
This method is called during Dist::Zilla prerequisite generation, and it injects supplementary prerequisites to make things match up.
applyto_phase
A multi-value attribute that specifies which phases to iterate and homogenize.
By default, this is:
applyto_phase = build applyto_phase = test applyto_phase = runtime applyto_phase = configure
However, you could extend it further to include develop if you wanted to.
develop
applyto_phase = build applyto_phase = test applyto_phase = runtime applyto_phase = configure appyyto_phase = develop
applyto_relation
A multi-value attribute that specifies which relations to iterate and homogenize.
applyto_relation = requires
However, you could extend it further to include suggests and recommends if you wanted to. You could even add conflicts ... but you really shouldn't.
suggests
recommends
conflicts
applyto_relation = requires applyto_relation = suggests applyto_relation = recommends applyto_relation = conflicts ; Danger will robinson.
applyto
A multi-value attribute that by default composites the values of
applyto_relation and applyto_phase.
This is if you want to be granular about how you specify phase/relations to process.
applyto = runtime.requires applyto = develop.requires applyto = test.suggests
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2017 by Kent Fredric <kentfredric@gmail.com>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla::Plugin::Prereqs::SyncVersions, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::Prereqs::SyncVersions
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::Prereqs::SyncVersions
For more information on module installation, please visit the detailed CPAN module installation guide.