I am trying to loading Digest::MD5 from the directory my Perl script is existing in (since I can't install through PPM on my enviroment.)
I've tried a bunch of combinations, but what appears to work on Strawberry perl on Windows, but not in Red Hat linux is having a Digest directory with MD5.pm, base.pm, and file.pm in it. Then I am using this code to load the module.
use FindBin;
use lib "$FindBin::Bin/";
use Digest::MD5 qw(md5_hex);
But I get this error:
Can't locate loadable object for module Digest::MD5 in @INC (@INC contains: /opt/myapp/bin/script/ /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at ./app.pl line 21. Compilation failed in require at ./app.pl line 21. BEGIN failed--compilation aborted at ./app.pl line 21.
I'm tired of banging my head on my desk, anyone have any ideas?
Edit:
This was marked as an exact duplicate of a very different question. This is not about a missing module, it is about including a module directly with a perl script so it can be packaged and installed without installing a module through PPM or CPAN or something.
/opt/myapp/bin/script/
and you have no lib directory in between? – simbabque