1Dist::CheckConflicts(3)User Contributed Perl DocumentatioDnist::CheckConflicts(3)
2
3
4

NAME

6       Dist::CheckConflicts - declare version conflicts for your dist
7

VERSION

9       version 0.06
10

SYNOPSIS

12           use Dist::CheckConflicts
13               -dist => 'Class-MOP',
14               -conflicts => {
15                   'Moose'                => '1.14',
16                   'namespace::autoclean' => '0.08',
17               },
18               -also => [
19                   'Package::Stash::Conflicts',
20               ];
21
22           __PACKAGE__->check_conflicts;
23

DESCRIPTION

25       One shortcoming of the CPAN clients that currently exist is that they
26       have no way of specifying conflicting downstream dependencies of
27       modules. This module attempts to work around this issue by allowing you
28       to specify conflicting versions of modules separately, and deal with
29       them after the module is done installing.
30
31       For instance, say you have a module "Foo", and some other module "Bar"
32       uses "Foo". If "Foo" were to change its API in a non-backwards-
33       compatible way, this would cause "Bar" to break until it is updated to
34       use the new API. "Foo" can't just depend on the fixed version of "Bar",
35       because this will cause a circular dependency (because "Bar" is already
36       depending on "Foo"), and this doesn't express intent properly anyway -
37       "Foo" doesn't use "Bar" at all. The ideal solution would be for there
38       to be a way to specify conflicting versions of modules in a way that
39       would let CPAN clients update conflicting modules automatically after
40       an existing module is upgraded, but until that happens, this module
41       will allow users to do this manually.
42
43       This module accepts a hash of options passed to its "use" statement,
44       with these keys being valid:
45
46       -conflicts
47           A hashref of conflict specifications, where keys are module names,
48           and values are the last broken version - any version greater than
49           the specified version should work.
50
51       -also
52           Additional modules to get conflicts from (potentially recursively).
53           This should generally be a list of modules which use
54           Dist::CheckConflicts, which correspond to the dists that your dist
55           depends on. (In an ideal world, this would be intuited directly
56           from your dependency list, but the dependency list isn't available
57           outside of build time).
58
59       -dist
60           The name of the distribution, to make the error message from
61           check_conflicts more user-friendly.
62
63       The methods listed below are exported by this module into the module
64       that uses it, so you should call these methods on your module, not
65       Dist::CheckConflicts.
66
67       As an example, this command line can be used to update your modules,
68       after installing the "Foo" dist (assuming that "Foo::Conflicts" is the
69       module in the "Foo" dist which uses Dist::CheckConflicts):
70
71           perl -MFoo::Conflicts -e'print "$_\n"
72               for map { $_->{package} } Foo::Conflicts->calculate_conflicts' | cpanm
73
74       As an added bonus, loading your conflicts module will provide warnings
75       at runtime if conflicting modules are detected (regardless of whether
76       they are loaded before or afterwards).
77

METHODS

79   conflicts
80       Returns the conflict specification (the "-conflicts" parameter to
81       "import()"), as a hash.
82
83   dist
84       Returns the dist name (either as specified by the "-dist" parameter to
85       "import()", or the package name which "use"d this module).
86
87   check_conflicts
88       Examine the modules that are currently installed, and throw an
89       exception with useful information if any modules are at versions which
90       conflict with the dist.
91
92   calculate_conflicts
93       Examine the modules that are currently installed, and return a list of
94       modules which conflict with the dist. The modules will be returned as a
95       list of hashrefs, each containing "package", "installed", and
96       "required" keys.
97

BUGS

99       No known bugs.
100
101       Please report any bugs through RT: email "bug-dist-checkconflicts at
102       rt.cpan.org", or browse to
103       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-CheckConflicts>.
104

SEE ALSO

106       Module::Install::CheckConflicts
107
108       Dist::Zilla::Plugin::Conflicts
109

SUPPORT

111       You can find this documentation for this module with the perldoc
112       command.
113
114           perldoc Dist::CheckConflicts
115
116       You can also look for information at:
117
118       ·   MetaCPAN
119
120           <https://metacpan.org/release/Dist-CheckConflicts>
121
122       ·   RT: CPAN's request tracker
123
124           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-CheckConflicts>
125
126       ·   Github
127
128           <https://github.com/doy/dist-checkconflicts>
129
130       ·   CPAN Ratings
131
132           <http://cpanratings.perl.org/d/Dist-CheckConflicts>
133

AUTHOR

135       Jesse Luehrs <doy at tozt dot net>
136
138       This software is copyright (c) 2013 by Jesse Luehrs.
139
140       This is free software; you can redistribute it and/or modify it under
141       the same terms as the Perl 5 programming language system itself.
142
143
144
145perl v5.16.3                      2013-06-21           Dist::CheckConflicts(3)
Impressum