Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: perl lost its modules!

by LanX (Archbishop)
on Apr 01, 2014 at 21:40 UTC ( #1080642=note: print w/replies, xml ) Need Help??


in reply to perl lost its modules!

hmm shooting in the dark:

  • which permissions does the directory /usr/share/perl5 have?

  • does use lib '/usr/share/perl5' help?

  • could you try printing @INC within a BEGIN block to exclude weird settings which only apply afterwards?

    Cheers Rolf

    ( addicted to the Perl Programming Language)

  • Replies are listed 'Best First'.
    Re^2: perl lost its modules!
    by seandarcy (Initiate) on Apr 01, 2014 at 23:14 UTC
      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.

        > 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)

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://1080642]
    help
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (8)
    As of 2019-09-19 21:23 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The room is dark, and your next move is ...












      Results (251 votes). Check out past polls.

      Notices?