I get hit by a similar problem occasionally. I would definitely check the permissions on the installed module. When I install as root, I sometimes forget to drop my umask from 077 (my paranoid default) to 022 (so that non-root users can read/execute stuff installed). Also look in architecture-specific subdirectories. (i.e., at work when I mess this up, I've got to check solaris4-multi-thread, or whatever, and at home, i686-linux subdirs).

Update: The reason the error message doesn't indicate anything about reading or executing is because it couldn't find the file, as the permissions on the directory containing the .pm are too strict. Example:

# ls -ld *perm{,/A.pm} drwx------ 2 root root 17 Jul 28 15:16 badperm -rw------- 1 root root 48 Jul 28 15:16 badperm/A.pm drwxr-xr-x 2 root root 17 Jul 28 15:16 goodperm -rw-r--r-- 1 root root 49 Jul 28 15:16 goodperm/A.pm # head *perm/A.pm | grep . ==> badperm/A.pm <== package A; print "Here I am (badperm/A).\n"; 1; ==> goodperm/A.pm <== package A; print "Here I am (goodperm/A).\n"; 1; # perl -we 'BEGIN { @INC=qw/badperm goodperm/; } use A' Here I am (badperm/A). $ perl -we 'BEGIN { @INC=qw/badperm goodperm/; } use A' Here I am (goodperm/A). $ perl -we 'BEGIN { @INC=qw/badperm/; } use A' Can't locate A.pm in @INC (@INC contains: badperm) at -e line 1. BEGIN failed--compilation aborted at -e line 1.

In reply to Re: Trouble with Perl CGI script by benizi
in thread Trouble with Perl CGI script by chakkaln

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.