Dist-Zilla-Plugin-Prereqs-SyncVersions
view release on metacpan or search on metacpan
lib/Dist/Zilla/Plugin/Prereqs/SyncVersions.pm view on Meta::CPAN
Namely, C<CPAN.pm> is confused when it sees:
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 C<[Prereqs]> directly,
and C<[AutoPrereqs]> already does the right thing, but it gets messier
when you're working with L<< plugins that inject their own prerequisites|https://github.com/dagolden/Path-Tiny/commit/c620171db96597456a182ea6088a24d8de5debf6 >>
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
=head1 METHODS
=head2 C<mvp_multivalue_args>
The following attributes exist, and may be specified more than once:
applyto
applyto_relation
applyto_phase
=head2 C<register_prereqs>
This method is called during C<Dist::Zilla> prerequisite generation,
and it injects supplementary prerequisites to make things match up.
=head1 ATTRIBUTES
=head2 C<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 C<develop> if you wanted to.
applyto_phase = build
applyto_phase = test
applyto_phase = runtime
applyto_phase = configure
appyyto_phase = develop
=head2 C<applyto_relation>
A multi-value attribute that specifies which relations to iterate and homogenize.
By default, this is:
applyto_relation = requires
However, you could extend it further to include C<suggests> and C<recommends> if you wanted to.
You could even add C<conflicts> ... but you really shouldn't.
applyto_relation = requires
applyto_relation = suggests
applyto_relation = recommends
applyto_relation = conflicts ; Danger will robinson.
=head2 C<applyto>
A multi-value attribute that by default composites the values of
C<applyto_relation> and C<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
=begin MetaPOD::JSON v1.1.0
{
"namespace":"Dist::Zilla::Plugin::Prereqs::SyncVersions",
"interface":"class",
"inherits":"Moose::Object",
"does":"Dist::Zilla::Role::PrereqSource"
}
=end MetaPOD::JSON
=head1 AUTHOR
Kent Fredric <kentnl@cpan.org>
=head1 COPYRIGHT AND LICENSE
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.
=cut
( run in 0.849 second using v1.01-cache-2.11-cpan-39bf76dae61 )