Installing Perl Modules with YUM
Just a quick note on how to install Perl modules with YUM. Due to differences in the naming conventions, YUM package name for a Perl module may differ from the the module’s native name in Perl. The workaround is to wrap the module name in “perl()”.
In the example below I am installing Circos and running the application’s Perl module verification utility. Anything that shows up as missing is piped through YUM installation.
circos -modules 2>/dev/null | grep ^missing | awk '{print $NF}' | while read line ; do yum -y install "perl(${line})" ; done
Nothing particularly amazing here, just something useful but too obscure to justify memorizing. Of course, the preferred way of installing Perl modules is via CPAN module manager. First, install cpan and run the quick configuration:
yum install perl-CPAN -y cpan
Then repeat the loop similar to the one above, but this time using cpan utility:
circos -modules 2>/dev/null | grep ^missing | awk '{print $NF}' | while read line ; do /usr/bin/perl -MCPAN -e "install ${line}" ; done