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.02
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

METHODS

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

TODO

95       Provide a way to insert a hook into @INC which warns if a conflicting
96       module is loaded (would this be reasonable?)
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       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dist-CheckConflicts>.
105

SEE ALSO

107       ·   Module::Install::CheckConflicts
108

SUPPORT

110       You can find this documentation for this module with the perldoc
111       command.
112
113           perldoc Dist::CheckConflicts
114
115       You can also look for information at:
116
117       ·   AnnoCPAN: Annotated CPAN documentation
118
119           http://annocpan.org/dist/Dist-CheckConflicts
120           <http://annocpan.org/dist/Dist-CheckConflicts>
121
122       ·   CPAN Ratings
123
124           http://cpanratings.perl.org/d/Dist-CheckConflicts
125           <http://cpanratings.perl.org/d/Dist-CheckConflicts>
126
127       ·   RT: CPAN's request tracker
128
129           http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-CheckConflicts
130           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-CheckConflicts>
131
132       ·   Search CPAN
133
134           http://search.cpan.org/dist/Dist-CheckConflicts
135           <http://search.cpan.org/dist/Dist-CheckConflicts>
136

AUTHOR

138       Jesse Luehrs <doy at tozt dot net>
139
141       This software is copyright (c) 2011 by Jesse Luehrs.
142
143       This is free software; you can redistribute it and/or modify it under
144       the same terms as the Perl 5 programming language system itself.
145
146
147
148perl v5.12.2                      2011-01-02           Dist::CheckConflicts(3)
Impressum