cpanm: apply MH feature (#6385)

* cpanm: apply MH feature

* add changelog frag
pull/6412/head
Alexei Znamensky 2023-04-23 08:58:02 +12:00 committed by GitHub
parent 0eb33c2839
commit ad6ff9b0c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -0,0 +1,2 @@
minor_changes:
- cpanm - minor change, use feature from ``ModuleHelper`` (https://github.com/ansible-collections/community.general/pull/6385).

View File

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