use Dist::CheckConflicts
-dist => 'Class-MOP',
-conflicts => {
'Moose' => '1.14',
'namespace::autoclean' => '0.08',
},
-also => [
'Package::Stash::Conflicts',
];
__PACKAGE__->check_conflicts;
For instance, say you have a module "Foo", and some other module "Bar" uses "Foo". If "Foo" were to change its API in a non-backwards-compatible way, this would cause "Bar" to break until it is updated to use the new API. "Foo" can't just depend on the fixed version of "Bar", because this will cause a circular dependency (because "Bar" is already depending on "Foo"), and this doesn't express intent properly anyway - "Foo" doesn't use "Bar" at all. The ideal solution would be for there to be a way to specify conflicting versions of modules in a way that would let CPAN clients update conflicting modules automatically after an existing module is upgraded, but until that happens, this module will allow users to do this manually.
This module accepts a hash of options passed to its "use" statement, with these keys being valid:
The methods listed below are exported by this module into the module that uses it, so you should call these methods on your module, not Dist::CheckConflicts.
As an example, this command line can be used to update your modules, after installing the "Foo" dist (assuming that "Foo::Conflicts" is the module in the "Foo" dist which uses Dist::CheckConflicts):
perl -MFoo::Conflicts -e'print "$_\n"
for map { $_->{package} } Foo::Conflicts->calculate_conflicts' | cpanm
As an added bonus, loading your conflicts module will provide warnings at runtime if conflicting modules are detected (regardless of whether they are loaded before or afterwards).
Please report any bugs to GitHub Issues at <https://github.com/doy/dist-checkconflicts/issues>.
Dist::Zilla::Plugin::Conflicts
perldoc Dist::CheckConflicts
You can also look for information at:
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-CheckConflicts>
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.