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. Google does not bring up a whole lot of help for me here, but I have to think this problem has already been solved. Thanks for any guidance you can give. -Alan -- ?Don't eat anything you've ever seen advertised on TV? - Michael Pollan, author of "In Defense of Food"
>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.While I can't answer that, I might try to actually call a Perl check after which although slightly extra work would yield the answer. You installing these locally in a non root users home? :) If not, I can tell you that will wreak havoc if a Perl related updated comes down the pipe via yum...
Alan McKay 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. > > Google does not bring up a whole lot of help for me here, but I have > to think this problem has already been solved. > > Thanks for any guidance you can give.First suggestion would be to check if these modules are available as rpms. Check the epel and rpmforge repositories. This will make things go much smoother both now and when you need to update later. -- Bowie
On 4/15/2010 3:23 PM, Alan McKay 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. > > Google does not bring up a whole lot of help for me here, but I have > to think this problem has already been solved. > > Thanks for any guidance you can give.Things sometimes get ugly when you mix CPAN/rpm installs. Have you checked epel/rpmforge/etc. for the modules you need? -- Les Mikesell lesmikesell at gmail.com
Am Donnerstag, den 15.04.2010, 22:23 +0200 schrieb Alan McKay:> 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. > > Google does not bring up a whole lot of help for me here, but I have > to think this problem has already been solved. > > Thanks for any guidance you can give. > > -Alan >Alan i do a lot of the perl CPAN RPMS at rpmforge, if oyu have any reasons to not use them please tell and I will try to fix that. Chris financial.com AG Munich head office/Hauptsitz M?nchen: Maria-Probst-Str. 19 | 80939 M?nchen | Germany Frankfurt branch office/Niederlassung Frankfurt: Messeturm | Friedrich-Ebert-Anlage 49 | 60327 Frankfurt | Germany Management board/Vorstand: Dr. Steffen Boehnert | Dr. Alexis Eisenhofer | Dr. Yann Samson | Matthias Wiederwach Supervisory board/Aufsichtsrat: Dr. Dr. Ernst zur Linden (chairman/Vorsitzender) Register court/Handelsregister: Munich ? HRB 128 972 | Sales tax ID number/St.Nr.: DE205 370 553
Hi, i don't know exactly if this would be usable for yourself, but very nice feature for our purposes is autobundling, see for example: http://search.cpan.org/~andk/CPAN-1.9402/lib/CPAN.pm#POPULATE_AN_INSTALLATION_WITH_LOTS_OF_MODULES or http://www.developertutorials.com/tutorials/cgi-perl/automate-perl-module-deployment-050426/page4.html As for RPMs, it could be sometimes problem with versions. RPMs aren't often the most recent versions of modules and resolving RPM dependencies could sometimes overwrite the most uptodate versions (which you need) by slightly older which may not be applicable. But this really depends... Tomas Thu, Apr 15, 2010 ve 04:23:32PM -0400, Alan McKay napsal:> 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. > > Google does not bring up a whole lot of help for me here, but I have > to think this problem has already been solved. > > Thanks for any guidance you can give. > > -Alan > > -- > ?Don't eat anything you've ever seen advertised on TV? > - Michael Pollan, author of "In Defense of Food" > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos
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