Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

I'm about to die because Perl Can't locate Module

by Anonymous Monk
on Jun 11, 2005 at 07:25 UTC ( #465764=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:


What if you installed a module to a certain directory and yet your perl script keeps giving you an error saying it can't find it installed. I'm 100% sure I installed it correctly using ActiveState PPM.

I even did a search for the module file and it finds it, yet perl keeps giving me this error!!
CGI Error The specified CGI application misbehaved by not returning a complete s +et of HTTP headers. The headers it did return are: Can't locate CGI/ in @INC (@INC contains: C:/Perl/lib C: +/Perl/site/lib) at line 13. BEGIN failed--compilation aborted at line 13.
Okay , I looked in C:/Perl/lib/CGI and there is NO ...BUT in C:/Perl/site/lib/CGI there IS an

On my PPM, It said successfuly installed AND, I even type "query Application" and it lists CGI::Application to be installed.

Why am I still getting this message?! Its killing me!!!

Thank you!

Replies are listed 'Best First'.
Re: I'm about to die because Perl Can't locate Module
by davido (Cardinal) on Jun 11, 2005 at 07:37 UTC

    If you type, on the command line the following:

    perl -e "use CGI::Application"

    do you get the same error? Or does it only crop up within your particular script, or when your script is executing as a CGI program?


Re: I'm about to die because Perl Can't locate Module
by eXile (Priest) on Jun 11, 2005 at 18:52 UTC
    Your problem might be that there is a file in CGI/ , but it is not readable by the user that is trying to execute it, or the path is not accessible for that user. I've never seen this problem on Windows (because i don't use it that often ...), but frequently had permission problems on unix because of a very stringent umask i use.
Re: I'm about to die because Perl Can't locate Module
by broquaint (Abbot) on Jun 11, 2005 at 11:51 UTC
    It sounds like C:/Perl/site/lib is not your path, but with a quick application of lib this can be remedied:
    use lib 'C:/Perl/site/lib';



      doesn't use lib just modify @INC ? The OP shows that @INC already includes C:\Perl\site\lib.

      Or am I missing something?

      - j
        No, you're quite right. I didn't look too hard at the error message it would seem.


Re: I'm about to die because Perl Can't locate Module
by tilly (Archbishop) on Jun 12, 2005 at 07:12 UTC
    Yet Another Possibility.

    Is it possible that your webserver is not the same as the PC that you installed CGI::Application to?

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://465764]
Approved by K_M_McMahon
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2023-12-10 14:54 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (40 votes). Check out past polls.