seandarcy has asked for the wisdom of the Perl Monks concerning the following question:
I'm on Fedora 20. perl-5.18.2-289.fc20.x86_64 As a user:
$ perl -e 'use strict; print "ok"' Can't locate strict.pm: Permission denied at -e line 1. BEGIN failed--compilation aborted at -e line 1.
$ ls -l /usr/share/perl5/strict.pm -rwxr-xr-x. 1 root root 3933 Jan 7 09:48 /usr/share/perl5/strict.pm
$ perl -e 'print join "\n", @INC' /root/perl5/lib/perl5/x86_64-linux-thread-multi /root/perl5/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5
and the user can read strict.pm:
$ cat /usr/share/perl5/strict.pm package strict; $strict::VERSION = "1.07"; ...............
As root this all works.
strict.pm is in @INC, and the user has read permission. There's not another strict.pm on the machine:
# locate strict.pm /usr/share/perl5/strict.pm #
What am I doing wrong?
sean$ perl -V Can't locate Config.pm: Permission denied.