Dist::C...nflicts(3)
πΈ NAME πΈ
okay so bestie, this is the Dist::C...nflicts(3) manual page from User Contributed Perl Documentation, and we're about to make CPAN conflicts make sense. no cap. π
Dist::CheckConflicts β declare version conflicts for your dist. literally that's the whole vibe. β¨
π VERSION π
version 0.11 β yes bestie, that's the version. π«Ά
β¨ SYNOPSIS β¨
use Dist::CheckConflicts
-dist => 'Class-MOP',
-conflicts => {
'Moose' => '1.14',
'namespace::autoclean' => '0.08',
},
-also => [
'Package::Stash::Conflicts',
];
__PACKAGE__->check_conflicts;
π DESCRIPTION π
okay so here's the tea: the CPAN clients that currently exist have one shortcoming β they literally have no way of specifying conflicting downstream dependencies of modules. π This module tries to work around that issue by letting you specify conflicting versions of modules separately, and then deal with them after the module is done installing. iconic workaround behavior. π
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's 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. periodt. π
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 fromcheck_conflictsmore 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. iykyk. π«Ά
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). main character bonus behavior. π
π₯ METHODS π₯
π conflicts
Returns the conflict specification (the -conflicts parameter to import()), as a hash. lowkey straightforward. πΈ
π dist
Returns the dist name (either as specified by the -dist parameter to import(), or the package name which used 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. not me getting a useful exception π
π 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. slay. β¨
π¦ BUGS π¦
No known bugs. π
Please report any bugs to GitHub Issues at <https://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 β
<https://metacpan.org/release/Dist-CheckConflicts> - Github β
<https://github.com/doy/dist-checkconflicts> - RT: CPAN's request tracker β
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Dist-CheckConflicts> - CPAN Ratings β
<http://cpanratings.perl.org/d/Dist-CheckConflicts>
π 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.
that's the whole page, bestie! footer tea: perl v5.42.0, dated 2015-02-06, and the manual is Dist::C...nflicts(3). mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Dist-CheckConflicts 0.11-160000.2.2 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms