I'm having problems trying to use modules downloaded from CPAN, but always the same problem for any module (I've tried Term::ReadKey, Crypt::Passwd, and Digest::MD5). After downloading the modules and putting each in /var/tmp/perl (i.e.- /var/tmp/perl/Digest/MD5.pm, /var/tmp/perl/Crypt/Passwd.pm, /var/tmp/perl/Term/ReadKey.pm) and then adding
use lib '/var/tmp/perl'; use Digest::MD5;
to a script that previously worked, without making any other changes to the script, I now get the following error:
Can't locate loadable object for module Digest::MD5 in @INC (@INC cont +ains: /var/tmp/perl /eng/local/lib/perl5/site_perl/5.6.1/sun4-solaris +/ /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5.6.1 +/usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/perl +5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at /var/tmp/jcorr +a/scripts/dev/alumni-shared.pl line 25 Compilation failed in require at /var/tmp/jcorra/scripts/dev/alumni-sh +ared.pl line 25. BEGIN failed--compilation aborted at /var/tmp/jcorra/scripts/dev/alumn +i-shared.pl line 25. Compilation failed in require at ./login.pl line 22.
Then, trying to execute the module directly:
perl /var/tmp/perl/Digest/MD5.pm Can't locate loadable object for module Digest::MD5 in @INC (@INC cont +ains: /usr/local/lib/perl5/5.6.1/sun4-solaris /usr/local/lib/perl5/5. +6.1 /usr/local/lib/perl5/site_perl/5.6.1/sun4-solaris /usr/local/lib/ +perl5/site_perl/5.6.1 /usr/local/lib/perl5/site_perl .) at /usr/local +/lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm line 112 DynaLoader::croak('Can\'t locate loadable object for module Di +gest::MD5 in @INC (@I...') called at /usr/local/lib/perl5/5.6.1/sun4- +solaris/DynaLoader.pm line 180 DynaLoader::bootstrap('Digest::MD5', 2.26) called at /var/tmp/ +perl/Digest/MD5.pm line 16 eval {...} called at /var/tmp/perl/Digest/MD5.pm line 15
I'm a programmer, not a systems administrator, so I don't have much (any) experience installing and configuring Perl, I just want to be able to download and use modules so I don't have to code everything from scratch. Can anyone offer any help on what I'm doing wrong?

In reply to Problem with DynaLoader and "use"ing downloaded modules by bnanaboy

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.