View previous topic :: View next topic |
Author |
Message |
doug-x07 Tux's lil' helper
Joined: 16 Nov 2002 Posts: 122 Location: Paris, France
|
Posted: Fri Jan 17, 2003 9:31 pm Post subject: Managing Perl Modules |
|
|
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 |
|
|
slartibartfasz Veteran
Joined: 29 Oct 2002 Posts: 1462 Location: Vienna, Austria
|
Posted: Fri Jan 17, 2003 10:57 pm Post subject: |
|
|
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 |
|
|
doug-x07 Tux's lil' helper
Joined: 16 Nov 2002 Posts: 122 Location: Paris, France
|
Posted: Fri Jan 17, 2003 11:20 pm Post subject: |
|
|
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 |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Sat Jan 18, 2003 6:58 am Post subject: |
|
|
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 |
|
|
doug-x07 Tux's lil' helper
Joined: 16 Nov 2002 Posts: 122 Location: Paris, France
|
Posted: Sat Jan 18, 2003 4:43 pm Post subject: |
|
|
Rac, I thought you would have something to say on the subject 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 |
|
|
abhishek Retired Dev
Joined: 28 Jun 2002 Posts: 393 Location: Los Angeles, CA
|
Posted: Thu Feb 20, 2003 12:56 am Post subject: |
|
|
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 |
|
|
flickerfly l33t
Joined: 08 Nov 2002 Posts: 677 Location: Lanham, MD
|
|
Back to top |
|
|
|