Skip to content
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ The actual package installed in this case is therefore: perl-YAML-Perl
exec_environment => [ "http_proxy=http://proxy.example42.com:8080" , "https_proxy=https://proxy.example42.com:8080" ],
}

* Specify an alternate command to check for existence of the module

perl::cpan::module { 'Bundle::LWP':
module_check_cmd => "perldoc -l LWP",
}

## USAGE - Basic management

Expand Down
5 changes: 3 additions & 2 deletions manifests/cpan/module.pp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
$package_name = '',
$package_prefix = $perl::package_prefix,
$package_suffix = $perl::package_suffix,
$module_check_cmd = "perldoc -l ${name}",

$url = '',
$exec_path = '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin',
Expand Down Expand Up @@ -51,8 +52,8 @@
}

$cpan_command_check = $ensure ? {
present => "perldoc -l ${name}",
absent => "perldoc -l ${name} || true",
present => "${module_check_cmd}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

puppet-lint complaining here, should be:

present => $module_check_cmd,

absent => "${module_check_cmd} || true",
}

case $bool_use_package {
Expand Down
5 changes: 3 additions & 2 deletions manifests/module.pp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
$package_prefix = $perl::package_prefix,
$package_suffix = $perl::package_suffix,
$package_downcase = $perl::package_downcase,
$module_check_cmd = "perldoc -l ${name}",

$url = '',
$exec_path = '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin',
Expand Down Expand Up @@ -52,8 +53,8 @@
}

$cpan_command_check = $ensure ? {
present => "perldoc -l ${name}",
absent => "perldoc -l ${name} || true",
present => "${module_check_cmd}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

puppet-lint complaining here, should be:

present => $module_check_cmd,

absent => "${module_check_cmd} || true",
}

case $bool_use_package {
Expand Down