Skip to content

Instantly share code, notes, and snippets.

@vifo
Created May 17, 2012 12:15
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save vifo/2718520 to your computer and use it in GitHub Desktop.
Save vifo/2718520 to your computer and use it in GitHub Desktop.
Perl: "notest install module" from shell using CPAN
#!/bin/sh
# Usage: cpannti.sh <module_names>
# cpan (i.e. App::Cpan) does not provide a direct way to install modules without
# testing them, as you can do in the CPAN shell with:
#
# cpan[1]> notest install FooBarBaz
#
# App::Cpan uses CPAN::Shell under the hood to perform installation, so let's do
# it ourselves the same way, but pass "notest" this time. Key sub for
# installation is CPAN::Shell::rematein().
perl -MCPAN -e 'foreach (@ARGV) { CPAN::Shell->rematein("notest", "install", $_) }' $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment