Dist::CheckConflicts (3)
Leading comments
Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) Standard preamble: ========================================================================
NAME
Dist::CheckConflicts - declare version conflicts for your distVERSION
version 0.11SYNOPSIS
use Dist::CheckConflicts -dist => 'Class-MOP', -conflicts => { 'Moose' => '1.14', 'namespace::autoclean' => '0.08', }, -also => [ 'Package::Stash::Conflicts', ]; __PACKAGE__->check_conflicts;
DESCRIPTION
One shortcoming of theFor instance, say you have a module "Foo", and some other module "Bar" uses "Foo". If "Foo" were to change its
This module accepts a hash of options passed to its "use" statement, with these keys being valid:
- -conflicts
- A hashref of conflict specifications, where keys are module names, and values are the last broken version - any version greater than the specified version should work.
- -also
- Additional modules to get conflicts from (potentially recursively). This should generally be a list of modules which use Dist::CheckConflicts, which correspond to the dists that your dist depends on. (In an ideal world, this would be intuited directly from your dependency list, but the dependency list isn't available outside of build time).
- -dist
- The name of the distribution, to make the error message from check_conflicts more user-friendly.
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).
METHODS
conflicts
Returns the conflict specification (the "-conflicts" parameter to "import()"), as a hash.dist
Returns the dist name (either as specified by the "-dist" parameter to "import()", or the package name which "use"d this module).check_conflicts
Examine the modules that are currently installed, and throw an exception with useful information if any modules are at versions which conflict with the dist.calculate_conflicts
Examine the modules that are currently installed, and return a list of modules which conflict with the dist. The modules will be returned as a list of hashrefs, each containing "package", "installed", and "required" keys.BUGS
No known bugs.Please report any bugs to GitHub Issues at <github.com/doy/dist-checkconflicts/issues>.
SEE ALSO
Module::Install::CheckConflictsDist::Zilla::Plugin::Conflicts
SUPPORT
You can find this documentation for this module with the perldoc command.
perldoc Dist::CheckConflicts
You can also look for information at:
- *
- MetaCPAN
- *
- Github
- *
-
RT: CPAN's request tracker
- *
-
CPANRatings
AUTHOR
Jesse Luehrs <doy@tozt.net>COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Jesse Luehrs.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.