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):