adjust docs

This commit is contained in:
Alexei Znamensky 2025-07-21 21:54:32 +12:00
commit 6b4a83052d

View file

@ -86,6 +86,14 @@ options:
description:
- Controls the module behavior. See notes below for more details.
- The default changed from V(compatibility) to V(new) in community.general 9.0.0.
- 'O(mode=new): The O(name) parameter may refer to a module name, a distribution file, a HTTP URL or a git repository
URL as described in C(cpanminus) documentation. C(cpanm) version specifiers are recognized. This is the default mode
from community.general 9.0.0 onwards.'
- 'O(mode=compatibility): This was the default mode before community.general 9.0.0. O(name) must be either a module
name or a distribution file. If the perl module given by O(name) is installed (at the exact O(version) when specified),
then nothing happens. Otherwise, it is installed using the C(cpanm) executable. O(name) cannot be an URL, or a git
URL. C(cpanm) version specifiers do not work in this mode.'
- 'B(ATTENTION): V(compatibility) mode is deprecated and will be removed in community.general 13.0.0.'
type: str
choices: [compatibility, new]
default: new
@ -98,14 +106,6 @@ options:
version_added: 3.0.0
notes:
- Please note that U(http://search.cpan.org/dist/App-cpanminus/bin/cpanm, cpanm) must be installed on the remote host.
- 'This module now comes with a choice of execution O(mode): V(compatibility) or V(new).'
- 'O(mode=compatibility): When using V(compatibility) mode, the module keeps backward compatibility. This was the default
mode before community.general 9.0.0. O(name) must be either a module name or a distribution file. If the perl module given
by O(name) is installed (at the exact O(version) when specified), then nothing happens. Otherwise, it is installed using
the C(cpanm) executable. O(name) cannot be an URL, or a git URL. C(cpanm) version specifiers do not work in this mode.'
- 'O(mode=new): When using V(new) mode, the module behaves differently. The O(name) parameter may refer to a module name,
a distribution file, a HTTP URL or a git repository URL as described in C(cpanminus) documentation. C(cpanm) version specifiers
are recognized. This is the default mode from community.general 9.0.0 onwards.'
seealso:
- name: C(cpanm) command manual page
description: Manual page for the command.
@ -211,7 +211,7 @@ class CPANMinus(ModuleHelper):
if v.mode == "compatibility":
if v.name_check:
self.do_raise("Parameter name_check can only be used with mode=new")
self.deprecate("'mode=compatibility' is deprecated, use 'mode=new' instead", version='12.0.0', collection_name="community.general")
self.deprecate("'mode=compatibility' is deprecated, use 'mode=new' instead", version='13.0.0', collection_name="community.general")
else:
if v.name and v.from_path:
self.do_raise("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'")