in reply to Re: perl lost its modules!
in thread perl lost its modules!

ls -l /usr/share | grep perl5 drwxr-xr-x. 49 root root 4096 Mar 31 18:40 perl5

I don't see how it's a system permissions issue. As user, I can cat the file

made a small test script:

$ cat perl-test.pl #!/usr/bin/perl use lib '/usr/share/perl5'; use strict; print "ok"; $ chmod +x perl-test.pl $ ./perl-test.pl Can't locate lib.pm: Permission denied at ./perl-test.pl line 2. BEGIN failed--compilation aborted at ./perl-test.pl line 2.

Not sure what you mean by printing @INC in a BEGIN block, but I sure don't know how.

Replies are listed 'Best First'.
Re^3: perl lost its modules!
by LanX (Saint) on Apr 02, 2014 at 01:26 UTC
    > I don't see how it's a system permissions issue. As user, I can cat the file

    Directory permissions distinguish between accessing files and reading the directory. If Perl can't read the dir then it can't find the modules, while it's still possible to access the files by full path.

    Anyway it seems boftx already found the solution further down. :)

    Cheers Rolf

    ( addicted to the Perl Programming Language)