From ad6ff9b0c5a14cf03f741e6a9e45897b75da33bb Mon Sep 17 00:00:00 2001 From: Alexei Znamensky <103110+russoz@users.noreply.github.com> Date: Sun, 23 Apr 2023 08:58:02 +1200 Subject: [PATCH] cpanm: apply MH feature (#6385) * cpanm: apply MH feature * add changelog frag --- changelogs/fragments/6385-cpan-mh-feat.yml | 2 ++ plugins/modules/cpanm.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/6385-cpan-mh-feat.yml diff --git a/changelogs/fragments/6385-cpan-mh-feat.yml b/changelogs/fragments/6385-cpan-mh-feat.yml new file mode 100644 index 0000000000..41944b60f8 --- /dev/null +++ b/changelogs/fragments/6385-cpan-mh-feat.yml @@ -0,0 +1,2 @@ +minor_changes: + - cpanm - minor change, use feature from ``ModuleHelper`` (https://github.com/ansible-collections/community.general/pull/6385). diff --git a/plugins/modules/cpanm.py b/plugins/modules/cpanm.py index b3d63e1fb1..6260992dfe 100644 --- a/plugins/modules/cpanm.py +++ b/plugins/modules/cpanm.py @@ -183,7 +183,7 @@ class CPANMinus(ModuleHelper): if v.name and v.from_path: self.do_raise("Parameters 'name' and 'from_path' are mutually exclusive when 'mode=new'") - self.command = self.module.get_bin_path(v.executable if v.executable else self.command) + self.command = self.get_bin_path(v.executable if v.executable else self.command) self.vars.set("binary", self.command) def _is_package_installed(self, name, locallib, version):