Silent and scripted install of CPAN and Perl modules?

Posted by Mikael Grönfelt on Server Fault See other posts from Server Fault or by Mikael Grönfelt
Published on 2012-02-28T12:58:10Z Indexed on 2012/03/22 23:31 UTC
Read the original article Hit count: 338

Filed under:
|
|
|

I need to install CPAN and some Perl modules automatically in a Scientific Linux (RHEL) installation script. Unfortunately the specific modules I want (at least one of them) cannot be found as RPM:s as far as I've seen.

So I need to install CPAN, configure it automatically (or with a config file) and then install the wanted modules (including dependencies) automatically as well.

This doesn't seem like a very unusual requirement, but I haven't seen any really good documentation on this. The problem is that whenever CPAN is launched for the first time an interactive configuration runs. Can this be skipped somehow? And how do I launch module installations directly from the command line?

© Server Fault or respective owner

Related posts about bash

Related posts about perl