Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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

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

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

Hello,

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/Application.pm in @INC (@INC contains: C:/Perl/lib C: +/Perl/site/lib) at main.pl line 13. BEGIN failed--compilation aborted at main.pl line 13.
Okay , I looked in C:/Perl/lib/CGI and there is NO Application.pm ...BUT in C:/Perl/site/lib/CGI there IS an Application.pm.

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?


    Dave

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/Application.pm , 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';
    HTH

    _________
    broquaint

      Hi

      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.
        HTH

        _________
        broquaint

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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2024-03-28 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found