Skip to content

Instantly share code, notes, and snippets.

@jmmills
Created October 7, 2014 22:29
Show Gist options
  • Select an option

  • Save jmmills/39b5d17b458e431f27aa to your computer and use it in GitHub Desktop.

Select an option

Save jmmills/39b5d17b458e431f27aa to your computer and use it in GitHub Desktop.
#!/bin/sh
_THREADS=$1
shift
_CPANM_OPTS="--notest --mirror http://ftp.cpan.org/pub/CPAN/ --mirror ${CPAN_MIRROR}"
cpanm --quiet --showdeps $* \
| xargs -n 1 -P $_THREADS cpanm ${_CPANM_OPTS} \
&& cpanm ${_CPANM_OPTS} $*
@andyfeller
Copy link

andyfeller commented Aug 17, 2016

Very nice! Any recommendations using this with 1) cpanfile and 2) local::lib?

Normally, I run builds as cpanm -l env --no-man-pages --notest --self-contained --installdeps . however that has become too slow and was hoping I could do something like you have above. It appears cpanfiles are only used with --installdeps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment