Skip to content

Commit

Permalink
Merge pull request redhat-openstack#216 from michakrause/master
Browse files Browse the repository at this point in the history
Perl Plugin: changed exec in provider 'false' case:
  • Loading branch information
blkperl committed Jan 24, 2015
2 parents 880baad + 7822ba6 commit ad60c64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manifests/plugin/perl/plugin.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@
}
false: {
# this will fail if perl collectd plugin module is not installed
exec { "perl -M${module} -e 1": path => $::path }
$include_dirs_prefixed = prefix($include_dirs, '-I')
$include_dirs_prefixed_joined = join($include_dirs_prefixed,' ')
exec { "perl ${include_dirs_prefixed_joined} -e 'my\$m=shift;eval\"use \$m\";exit!exists\$INC{\$m=~s!::!/!gr.\".pm\"}' ${module}":
path => $::path
}
}
default: {
fail("Unsupported provider: ${provider}. Use 'package', 'cpan',
Expand Down

0 comments on commit ad60c64

Please sign in to comment.