Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

How to deal with distro Perl modules _and_ CPAN ?

by Krambambuli (Curate)
on Apr 24, 2009 at 10:16 UTC ( #759780=perlquestion: print w/replies, xml ) Need Help??
Krambambuli has asked for the wisdom of the Perl Monks concerning the following question:

Dear PerlMonks,

I wonder what the best [well, recommended, proven to be good ] practices are to deal with distro Perl modules _and_ CPAN modules.

My current approach - I'm currently on Fedora 10, but the question is actually the same for all Linux distros - is to use the distro's install/update mechanism, then install/update CPAN and update/upgrade everything that's newer on CPAN.

With some rare exceptions, this seems to work pretty well - the only annoyance is that whenever the distro stock Perl is updated, I have to repeat the CPAN-syncing procedure, as some (lots...) of the previously updated modules seem to get lost during the Perl upgrade.

I can live with that, however I wonder how other Monks are dealing with this problem. Never installing the distro stock Perl and associated modules seems a bit too harsh to me.

Many thanks in advance,

Krambambuli
---
  • Comment on How to deal with distro Perl modules _and_ CPAN ?

Replies are listed 'Best First'.
Re: How to deal with distro Perl modules _and_ CPAN ?
by ELISHEVA (Prior) on Apr 24, 2009 at 10:48 UTC
    What is the best way to install CPAN modules on Debian? discusses some of the options for Debian. Debian uses its Perl distro as part of its OS - compunding the problem. There are also some scattered comments about Solaris, Ubuntu, RedHat, CentOS, among others (no Fedora though). Perhaps you would find it helpful.

    Best, beth

      Double Plus Plus endorsement of Beth's suggestion. The original question is written excellently and followup discussion packed with thoughtful suggestions.

      Be Appropriate && Follow Your Curiosity
Re: How to deal with distro Perl modules _and_ CPAN ?
by Bloodnok (Vicar) on Apr 24, 2009 at 10:33 UTC
    I'm now using Ubuntu i.e. no Windoze, for any perl development and found your base strategy to work reasonably well ... until I came to install Devel::ptkdb.

    What fun and games I had trying to first identify, then locate and finally install Tk and all the dependencies on my laptop.

    When I came to install on the desktop, I discovered the perl-tk package - which, as does as it says on the tin, and delivers it [Tk] at the press of a button - what luxury - thus considerably simplifying the CPAN installation of Devel::ptkdb.

    The conclusion is, like a lot of things, to abide by the spirit of the KISS acronym - if it's already been made easier (by being pre-built & packaged) then use it (someone else has already been thro' the pain & it would be rude to ignore their effort - .oO(If only there were ways to recognise it)), otherwise use the CPAN approach.

    Just my 2 pen'orth

    A user level that continues to overstate my experience :-))
Re: How to deal with distro Perl modules _and_ CPAN ?
by przemo (Scribe) on Apr 24, 2009 at 19:29 UTC
    My current approach - I'm currently on Fedora 10, but the question is actually the same for all Linux distros - is to use the distro's install/update mechanism, then install/update CPAN and update/upgrade everything that's newer on CPAN.

    I've never tried that although I was very tempted.

    An interesting point was made by chromatic on Modern Perl Books blog:

    OS vendors who package and distribute Perl and use it for core utilities should install their core libraries in a specific directory accessible only by their core utilities and they should configure Perl to install modules from the CPAN in another directory where their utilities do not look.

    That is, if you distribute Perl as part of an OS or distribution, and you distribute Perl utilities which the system needs to function, you must pay attention to specific library versions and ensure that the proper library versions are available, even if users install newer versions from the CPAN.

    Do OS vendors do so? Unless I don't understand above quote, keeping /usr/local at the beginning of @INC for e.g. scripts in /usr/sbin is "broken-CPAN-update-prone".

    $ sudo perl -V @INC: /etc/perl /usr/local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://759780]
Approved by lakshmananindia
help
Chatterbox?
[james28909]: what if one day we are able to grab the curtain that is "spacetime" and pull it back to reveal <insert imagination here> pulling at levers and ropes xD
[holli]: like dorothy?
[james28909]: see ya later holli
[james28909]: yeah like wizard of oz lol. its just a joke though
[james28909]: i cannot understand how someone cant see that a cloud of gas that evolves into a solar system or galaxies. it just makes sense to me. everythign that has happened, had to have happened for anything on this planet to be.
[james28909]: /gas/gas and debris/
[james28909]: another thing, i used to be atheist. life experiences, personal evidence. and my own perception is the reason why i believe the things i do.
[erix]: and now you are agnostic?
[james28909]: arunbear, your picking bits of history to fit your own narrative. right now, humans are smarter than in any of those times.
[james28909]: in order for there to be a mutation, there has to be a universe with laws setup that even allow a mutation.

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2017-12-15 14:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What programming language do you hate the most?




















    Results (433 votes). Check out past polls.

    Notices?