[CentOS] scripting CPAN installs

Fri Apr 23 09:39:43 UTC 2010
Dave Cross <davorg at gmail.com>

On 15 April 2010 21:23, Alan McKay <alan.mckay at gmail.com> wrote:
> Hey folks,
>
> Maybe there is a Perl/CPAN list that is a better place to ask this?
> If so, maybe someone can point me to it.
>
> Anyway, I want to be able to script the installation of a bunch of
> CPAN modules, and the first basic problem I am coming up against is
> that the "cpan" command seems to always return 0 regardless of whether
> or not the install completed.

I don't know if this will solve your problem, but I'm surprised to
hear about people still using the cpan command-line program. The
CPANPLUS module has been included with Perl for several years and I
recommend investigating its cpanp command-line program instead of
cpan.

And if you want something even more up to date, you can look at
cpanminus - which is packaged as perl-App-cpanminus at my CPAN/RPM
repository (http://rpm.mag-sol.com/).

Finally, can I repeat the advice that other people have hinted at.
Mixing CPAN-installed modules and RPM-installed modules in a single
Centos installation is a really bad idea. I highly recommend using
only RPM-packaged modules (and learning to build your own[1] for ones
that you can't find elsewhere).

Cheers,

Dave...

[1] http://www.slideshare.net/davorg/perl-in-rpmland-presentation