Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Managing Perl Modules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Fri Jan 17, 2003 9:31 pm    Post subject: Managing Perl Modules Reply with quote

Here's the situation. I need to have recent versions of perl modules (including certain core ones) installed on my system to be in sync with those I use at work. I've been trying to use the ebuilds to do this but is has finally got on my nerves and I'm trying to find an easier way for managing all my modules with cpan.

My question is how are other people managing this and have they come across any issues? It seems wise to me to recompile all my modules after a version bump. For example on a non gentoo box to upgrade perl I would just make an autobundle or run cpan -r to recompile everything. I don't know how wise an idea it is to do that when running cpan alongside the core perl ebuild. I tried and got freaked when it proposed to install perl-5.7.3 (where did that come from??) It also recompiles all of perl 5.8. I suppose I could trim the bundle somewhat to get round this.

I can't figure out the best way to handle this, if anyone has any thoughts please voice them. Are there any potential issues that I ought to take into account?
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
slartibartfasz
Veteran
Veteran


Joined: 29 Oct 2002
Posts: 1462
Location: Vienna, Austria

PostPosted: Fri Jan 17, 2003 10:57 pm    Post subject: Reply with quote

i use:

Code:
perl -MCPAN -e shell


no problems so far, but i dont know about a real version control in this field...
_________________
To an engineer the glass is neither half full, nor half empty - it is just twice as big as it needs to be.
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Fri Jan 17, 2003 11:20 pm    Post subject: Reply with quote

Code:
perl -MCPAN -e shell

That just gives you access to the cpan shell. What I'm really looking for is a way to update and compile all the 650 modules except the perl libraries and without borking integration to the base gentoo system. I usually run a perl program that runs on top of the cpan module to check all installed mods, make a bundle of those versions that need updating.

This is really easy to do when you are managing your whole perl set up independently, as it's what cpan was intended for. However with each ebuild bump I need to recompile my mods and I'm not sure what approach to take with regards to how perl is configured in gentoo.
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
rac
Bodhisattva
Bodhisattva


Joined: 30 May 2002
Posts: 6553
Location: Japanifornia

PostPosted: Sat Jan 18, 2003 6:58 am    Post subject: Reply with quote

Have you had a look at /usr/bin/g-cpan.pl, included in recent portages? I haven't tried it yet, but it looks like a Portage front-end to CPAN.pm, and it might be of service.
_________________
For every higher wall, there is a taller ladder
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Sat Jan 18, 2003 4:43 pm    Post subject: Reply with quote

Rac, I thought you would have something to say on the subject :wink: I've taken a quick look at /usr/bin/g-cpan.pl. Nice bit of programming to get round the cpan hooks problem. You feed it a perl module name, it then checks your cpan metadata to see if you already have it installed, checks whether an ebuild exists for it already, makes an ebuild if not, then gets it with cpan, does the md5 and runs the generated ebuild.

The big advantage is that this then gets recorded into /var/db/pkg/dev-perl/ so portage becomes aware of what you have installed. However whilst playing around with it I came across several problems. Tried emerging Spread with it and it warns of an unitialised value whilst creating the ebuild and then it can't find the ebuild to be run. Ran Net::Google and it finds the dependencies on Soap::Lite, Test::More and tells me ebuilds already exist (both are installed already though). It then hits Carp which is part of core perl and refuses to run make without the force option and crashes. Tried a few more straightforward modules and did not have any problems and could access them after through portage.

I like the idea of this front-end on cpan as the virtual ebuilds make a great hook between portage and cpan and frees dev-perl for ebuilds that are depended on by other programs. However it does not seem from my quick look to resolve two problems. If I want to upgrade a module version it will seemingly stop as it finds the module already installed. The second potential problem is with recompiling modules, just like modules I install through cpan, libperl_rebuilder does not seem to find the ones installed with g-cpan.

I'll take a longer look at this and see what else can be done. Is anyone else trying this? If you want more details on the subject check out bug 3450. Not too sure what the current status of integration into the emerge command is at the moment. Many thanks to J Robert Ray and Michael Cummings for managing to get so far with this :)
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
abhishek
Retired Dev
Retired Dev


Joined: 28 Jun 2002
Posts: 393
Location: Los Angeles, CA

PostPosted: Thu Feb 20, 2003 12:56 am    Post subject: Reply with quote

I'm having trouble using g-cpan.pl. I want to write an ebuild for a perl program, and it depends on some modules not in portage. But when I try and make ebilds for them(sudo g-cpan.pl IO::Socket) it says the package is alreaady installed, which is true, as I indtalled it myself using CPAN. But now how do I get ebuilds for the module?
Back to top
View user's profile Send private message
flickerfly
l33t
l33t


Joined: 08 Nov 2002
Posts: 677
Location: Lanham, MD

PostPosted: Fri May 23, 2003 2:45 pm    Post subject: g-cpan.pl Usage Reply with quote

Anyone have a usage or help dialog for this? I keep getting errors and I'm figuring it's related to the fact that I don't know what arguments to give.
_________________
An Evil Genious' Guide to Sheeple and How To Avoid Becoming One | 0x4C9EF4A
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum