FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 04-15-2010, 08:23 PM
Alan McKay
 
Default scripting CPAN installs

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2010, 08:27 PM
"Joseph L. Casale"
 
Default scripting CPAN installs

>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...
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2010, 08:30 PM
Bowie Bailey
 
Default scripting CPAN installs

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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2010, 08:31 PM
Alan McKay
 
Default scripting CPAN installs

> 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.

Hmmm, good point - I could do that. I've come across several methods
of checking module versions and none of them seemed "perfect" to me.
Can you recommend a method?

> 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...

We don't do auto-updates on production boxes so this is not a concern.
And yeah, my other alternative would be to do it all via yum instead
of CPAN, but that would be a massive change to the system I've
inherited.


--
“Don't eat anything you've ever seen advertised on TV”
- Michael Pollan, author of "In Defense of Food"
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2010, 08:36 PM
"Joseph L. Casale"
 
Default scripting CPAN installs

>Hmmm, good point - I could do that. I've come across several methods
>of checking module versions and none of them seemed "perfect" to me.
>Can you recommend a method?

Well, depends if you are in Perl, or bash, but really something as simple
as:

perl -e 'use HTML::Parser;'
echo $?

Aside from the mess of Perl diag which you can redirect away, you'll get
a 0 or not.

>We don't do auto-updates on production boxes so this is not a concern.
> And yeah, my other alternative would be to do it all via yum instead
>of CPAN, but that would be a massive change to the system I've
>inherited.

Good lord no, I don't either But when you "do" update
Shame about the inheritance issue, it's not hard to install modules out
of the base location and pull them in, unless you have a mess to change
I guess...
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-15-2010, 08:38 PM
Les Mikesell
 
Default scripting CPAN installs

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@gmail.com
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-16-2010, 02:46 AM
Jobst Schmalenbach
 
Default scripting CPAN installs

On Thu, Apr 15, 2010 at 04:31:08PM -0400, Alan McKay (alan.mckay@gmail.com) wrote:
> > 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.

> snip

> We don't do auto-updates on production boxes so this is not a concern.
> And yeah, my other alternative would be to do it all via yum instead
> of CPAN, but that would be a massive change to the system I've
> inherited.

Correct me if I am wrong, but I was under the impression that this
does not matter as the RPM's plug all the stuff into the correct
locations for perl and the modules ... I use a lot of perl modules
(e.g. for mimedefang, some online stuff I do etc) and cross upgraded
a few machines, e.g. from FC6 to CentOS 5.4.

So the perl installation used to be totally CPAN based, now I upgrade
most of the stuff from YUM. So far nothing has been broken and they
are all rock solid.

So I would look for the RPM first, then for CPAN.



Jobst











>
>
> --
> ?Don't eat anything you've ever seen advertised on TV?
> - Michael Pollan, author of "In Defense of Food"
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos

--
f u cn rd ths, u cn gt a gd jb n cmptr prgmmng. [Anon]

| |0| | Jobst Schmalenbach, jobst@barrett.com.au, General Manager
| | |0| Barrett Consulting Group P/L & The Meditation Room P/L
|0|0|0| +61 3 9532 7677, POBox 277, Caulfield South, 3162, Australia
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-16-2010, 09:29 AM
Christoph Maser
 
Default scripting CPAN installs

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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-16-2010, 12:31 PM
Les Mikesell
 
Default scripting CPAN installs

Christoph Maser wrote:
> 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.

The main problem with 3rd party repos is that you have to be careful about
updates causing dependency conflicts, especially if you use more than one. I
normally leave the repos disabled in the yum config and explicitly use "yum
--enablerepo=reponame install packagename" to pull only the packages I want and
look carefully at the list of dependencies.

--
Les Mikesell
lesmikesell@gmail.com


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 04-16-2010, 01:26 PM
Tomas Ruprich
 
Default scripting CPAN installs

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_MODU LES
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@centos.org
> http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 02:35 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org