Open apennebaker opened 10 years ago
The check for the presence of a module is done with perldoc -l
Good point, I'm not sure what to do in that case.
App::Ack mainly installs a binary, ack
. But I'm not sure we could generalize this.
What can easily be done is to add a parameter to the define that allows customization of the command to use to check for a module existence. The default can keep on using perldoc, but in edge cases the user may provide a custom command, whatever it might be
Yeah! onlyif => "/usr/bin/test ! -f <file>"
works well for Exec
s. Could Perl modules get this attribute as well?
Ubuntu doesn't (in my experience) install perldoc by default
$ perldoc -l perldoc
You need to install the perl-doc package to use this program.
True, the perl class manages its installation (on Ubuntu). I'm not a perl guru, and this is what I found online as a way to check, more or less reliably, for the precence of a module, if there are better methods please let me know. In any case it makes sense to add an option to let users specify custom check commands, for cope with edge cases. I can do it when I find time (not likely in the near future), relevant PRs are welcomed.
Should Class['Perl']
require Package['perl-doc']
before attempting to install Perl modules?
Perl::Critic installs successfully on a fresh box with
vagrant up
. Then, everyvagrant provision
after that installs Perl::Critic again and again.Source:
https://github.com/mcandre/mcandre-ubuntu