btr has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I've read the CPAN.pm FAQ and documentation, but I have a couple of questions that I'd like to get feedback on based on other people's experience.

I configured CPAN to install everything in ~/perl and run CPAN.pm exclusively as "me" (not root) to avoid messing with the default /usr/lib/perl5 installation. My assumption is that I all module packages should use the arguments passed to them by CPAN.pm and not try to override those settings... I know that they can try to do whatever they want to do, but they should all be following the same conventions, right?

Nonetheless, I can't seem to even upgrade Bundle::CPAN without some module failing to install properly. I've noticed that some modules still attempt to install themselves in /usr/lib/perl5 and I'm not sure if it's the module's problem or my system configuration. One example is ExtUtils::AutoInstall.

In general, is it wrong to expect that I should be able to install everything as a non-root user in ~/perl, or are there some cases where a module must be installed by root? (I don't care if other users can't access what I install.)

I've also noticed that some modules are unpacked under .cpan/build with their original ownership (which shows up as a number because it's not in my passwd), thus causing build problems when the install script tries to move/create/delete files in that directory tree. This sounds like a problem with CPAN.pm, but why would it do this with only a few modules? This happened with Class::ErrorHandler and Crypt::DES_EDE3.

Has everyone else had a smooth experience with CPAN.pm? I was expecting to just install Bundle::CPAN and say yes to all the dependency prompts and have it go off without a hitch.

Thanks.

  • Comment on Looking for CPAN.pm insight/best practice

Replies are listed 'Best First'.
Re: Looking for CPAN.pm insight/best practice
by 5mi11er (Deacon) on Oct 25, 2005 at 15:33 UTC
    Modules under CPAN are written by volunteers; therefore, while every effort is made to educate those that want to submit something to CPAN that their modules should follow conventions, it obviously does not happen for some.

    For those modules you have problems installing in this way, you can make a difference by figuring out why something is failing in your case, and submitting instructions to the module author/maintainer on how to fix the problem. ie. Patches are usually welcomed and tend to get more attention than simply filling out a bug report.

    -Scott

      Thanks. I figured that I should somehow let the author know about the problem (after determining that it is a legitimate problem). Thanks for the tip about (not) submitting a bug report.
        I *do* suggest filling out a bug report, especially if you decide not to do anything else; but patches or a detailed "here's what I had to do to fix the problem" report is going to be thousands of times more likely to be utilized to fix the problem than just a bug report.

        -Scott