I wanted to experiment with the CPAN module so I run perl -MCPAN -e shell, configured it and tried to reinstall two modules that I previously had installed by hand. Everything went ok and the modules ended up under the PREFIX directory I specified during CPAN configuration. This line caught my attention: Appending installation info to /home/hue/lang/perl/modules/lib/perl/5.8.7/perllocal.pod. I went to see that file with perldoc and discovered what seems to be an installation log. Great! It reads:

Sat Sep 24 12:24:26 2005: "Module" Digest::SHA - "installed into: /home/hue/lang/perl/modules/share/perl/5.8 +.7" - <blah> Sat Sep 24 12:30:21 2005: "Module" Language::Befunge - "installed into: /home/hue/lang/perl/modules/share/perl/5.8 +.7" - <blah>

But when I go to the filesystem to check this, I find:

|-- lib | `-- perl | `-- 5.8.7 | |-- Digest | | `-- SHA.pm | |-- auto | | |-- Digest | | | `-- SHA | | | |-- SHA.bs | | | `-- SHA.so | | `-- Language | | `-- Befunge | `-- perllocal.pod |-- share | `-- perl | `-- 5.8.7 | `-- Language | |-- Befunge | | `-- <blah> | `-- Befunge.pm

That is, SHA.pm is under lib/perl/5.8.7 but Befunge.pm under share/perl/5.8.7.

I did export PERL5LIB=~/lang/perl/modules/lib/perl/5.8.7 and now I can use Digest::SHA; but when I use Language::Befunge; I get the usual error message telling me that Language/Befunge.pm is not in @INC. If I export PERL5LIB=~/lang/perl/modules/share/perl/5.8.7, I can use Language::Befunge; but not Digest::SHA. As expected :^).

My question is, why perllocal.pod says both modules are in share/perl/5.8.7 when it's not true?

--
David Serrano


In reply to Modules installation path by Hue-Bond

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.