Created
May 17, 2012 12:15
-
-
Save vifo/2718520 to your computer and use it in GitHub Desktop.
Perl: "notest install module" from shell using CPAN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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