For some reason, when a module has to involve architecture-specific or perl-build-specific components (e.g. "x86_64-linux-thread-multi"), the sub-paths for keeping this distinct are not automatically included as part of the "additional" paths in @INC.

So, even though you have "/home/lib/perl5/site_perl/5.8.5" already in @INC, this does not automatically extend to include the "x86_64-linux-thread-multi" subdirectory of that path, which is where essential components of this module got installed.

To get around that, add to your normal shell environment a setting for "PERL5LIB", which includes both "/home/lib/perl5/site_perl/5.8.5" and "/home/lib/perl5/site_perl/5.8.5/x86_64-linux-thread-multi".

Or, whenever you write a script that uses that module, add "-I" on the shebang line, with that latter path; or push that path onto @INC and then "require" the module.

Both approaches (fixing the shell environment, adding the path in your scripts) have their down-sides for portability (every user has to modify their shell env., or every script has to have hard-coded paths). Maybe there's yet another way that's better, and if so, I hope someone will post that.

(BTW: please use <code> tags, as per Writeup Formatting Tips, not <pre>, so that long strings get wrapped sensibly -- and/or, edit your post to add line breaks to the error message.) Thanks for fixing the formatting.

UPDATE: In testing out the code snippet suggested in my second reply below, I came to understand the difference between these two shell environment variables that control perl's @INC at run-time:

PERLLIB=... # does NOT interpolate to include OS/build-specific subpa +ths PERL5LIB=... # DOES interpolate to include OS/build-specific subpaths
The proof (on my macosx/darwin/perl5.8.8 system) was that when I set "PERLLIB" to "/Users/graff/perl5/5.8.8", my script actually added "/Users/graff/perl5/5.8.8/darwin-thread-multi-2level" (because it existed but was not in @INC).

But if I "unset PERLLIB" and instead set PERL5LIB to "/Users/graff/perl5/5.8.8", my script doesn't do anything, because @INC already has the "darwin-thread-multi-2level" subdir there.


In reply to Re: Unicode::Map cannot be loaded by graff
in thread Unicode::Map cannot be loaded by utku

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.