in reply to Re: Issue with @INC
in thread Issue with @INC

Oh yes, you're entirely right. I tested with

[SiDMBP2:~] urinine% perl dog.pl Can't locate feature.pm: Permission denied at dog.pl line 1. BEGIN failed--compilation aborted at dog.pl line 1. [SiDMBP2:~] urinine% sudo perl dog.pl Hello World Wednesday

So it IS permissions. Okay what's the issue:

[SiDMBP2:~] urinine% perl -e 'print(join("\n", @INC))' | xargs ls -ld ls: /Library/Perl/Updates/5.18.4: Permission denied ls: /Network/Library/Perl/5.18: No such file or directory ls: /Network/Library/Perl/5.18/darwin-thread-multi-2level: No such fil +e or directory drwxr-xr-x+ 55 urinine staff 1760 Oct 14 14:32 . drwxr-xr-x 25 root wheel 800 Oct 14 11:08 /Library/Perl/5.18 drwxr-xr-x 11 root wheel 352 Oct 14 11:08 /Library/Perl/5.18/d +arwin-thread-multi-2level drwxr-xr-x 130 root wheel 4160 Jul 24 08:26 /System/Library/Perl +/5.18 drwxr-xr-x 56 root wheel 1792 Jul 24 08:26 /System/Library/Perl +/5.18/darwin-thread-multi-2level drwxr-xr-x 109 root wheel 3488 Aug 17 2018 /System/Library/Perl +/Extras/5.18 drwxr-xr-x 72 root wheel 2304 Sep 21 2018 /System/Library/Perl +/Extras/5.18/darwin-thread-multi-2level

So what's in that first directory

[SiDMBP2:/Library/Perl] urinine% sudo ls -l /Library/Perl/Updates/5.18 +.4 total 0 drwx------ 3 root wheel 96 Oct 14 11:03 darwin-thread-multi-2level [SiDMBP2:/Library/Perl] urinine% sudo ls -l /Library/Perl/Updates/5.18 +.4/darwin-thread-multi-2level total 16 -rw------- 1 root wheel 7027 Oct 14 11:08 perllocal.pod

Yep. Can't access those. So can I pull that out of my @INC somehow, or should I just blast some ugly overblown permissions over the directories?

Replies are listed 'Best First'.
Re^3: Issue with @INC
by dave_the_m (Monsignor) on Oct 14, 2019 at 19:46 UTC
    Well I'm not familiar with macs, but assuming all those paths are hard-coded into your perl binary (you can check with perl -V) then it seems most likely that the permissions on the directory is the thing needing fixing.

    Dave.

Re^3: Issue with @INC
by jcb (Parson) on Oct 16, 2019 at 22:39 UTC

    Those directories hold the installed Perl system and should be 0755 for directories and 0644 for files. I believe that chown a+rX -R `perl -e 'print(join("\n", @INC))'` at a root prompt should fix it. The root cause was probably a bad umask value while updating Perl modules.

    Those permissions are not overblown at all — most of the system should be accessible to all users.