actions-setup-perl
actions-setup-perl copied to clipboard
cpanm --installdeps
Related to #456: How do I install modules listed in my Makefile.PL? Normally cpanm -l . --installdeps .
works for me normally but I would like to see the recommended way. I don't want to have to list them in both the Makefile.PL and github workflow yml file but please tell me if that is what I must be doing.
And what would -l
point to? Is there a directory in PERL5LIB
? I just feel like the modules installation documentation is pretty short.
Here is an example of --installdeps
not working: https://github.com/lskatz/any2index/runs/3497261716?check_suite_focus=true#step:6:26
For reference, I'm running something like cpanm --local-lib ${GITHUB_WORKSPACE}/local --installdeps .
when I'm in this situation in a GitHub Actions workflow. Notably in this case, any caching of the local
directory has to be taken care of outside actions-setup-perl
, as it will not cache the contents (since caching seems to happen during shogo82148/actions-setup-perl@v1
step instead of at end of the job, like with the standard actions/cache@v3
).
It would be indeed nice to have a way to run cpanm
with some arguments directly from theshogo82148/actions-setup-perl@v1
step, regardless of having a cpanfile
or having to install any modules with install-modules
. Something like this:
- name: Setup Perl
uses: shogo82148/actions-setup-perl@v1
with:
install-modules-with: cpanm
install-modules-args: --installdeps --with-develop .
which would run cpanm --local-lib-contained local --notest -installdeps --with-develop .
.
@shogo82148, what do you think? Would something like that be feasible in installWithCpanm
?