in reply to Can't locate AMOS/AmosLib.pm in @INC

If your AmosLib.pm file declares package AMOS::AmosLib;, then change:
export PERL5LIB=/usr/local/bin/amos-3.1.0-rc1/lib/AMOS:$PERL5LIB

to:

export PERL5LIB=/usr/local/bin/amos-3.1.0-rc1/lib:$PERL5LIB

See also: Simple Module Tutorial and require

Replies are listed 'Best First'.
Re^2: Can't locate AMOS/AmosLib.pm in @INC
by Jeri (Scribe) on May 18, 2012 at 15:40 UTC
    Okay. I checked the file. It was AMOS::AmosLib like you suspected. So I changed the export and got the same error with no change. I also tried putting the .pm in the /etc/perl directory.
      Create a new script with just these lines in it:
      #!/usr/bin/env perl use Data::Dumper; print Dumper(\@INC); print "$_\n" for glob '/usr/local/bin/amos-3.1.0-rc1/lib'
      Run it and post the results in readmore tags.
        jdilts@jdilts-VirtualBox:~$ perl datadumper.pl $VAR1 = [ '/usr/local/bin/amos-3.1.0-rc1/lib', '/usr/local/bin/amos-3.1.0-rc1/lib/AMOS', '/usr/local/bin/amos-3.1.0-rc1/src/PerlModules', '/home/jdilts/perl5/lib/perl5/i686-linux-gnu-thread-multi-64 +int', '/home/jdilts/perl5/lib/perl5/i686-linux-gnu-thread-multi-64 +int', '/home/jdilts/perl5/lib/perl5', '/etc/perl', '/usr/local/lib/perl/5.14.2', '/usr/local/share/perl/5.14.2', '/usr/lib/perl5', '/usr/share/perl5', '/usr/lib/perl/5.14', '/usr/share/perl/5.14', '/usr/local/lib/site_perl', '.' ]; /usr/local/bin/amos-3.1.-rc1/lib
      I also tried putting the .pm in the /etc/perl directory.

      Did you put AmosLib.pm in /etc/perl/AMOS/?


      Improve your skills with Modern Perl: the free book.

        No, but I will give it a try.
      Honestly, I'm not trying to be a burden. I just need to know how to get a path I want into @INC. Thanks!