|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
require fails in CGIby heezy (Monk) |
| on Oct 10, 2003 at 13:54 UTC ( [id://298350]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.heezy has asked for the wisdom of the Perl Monks concerning the following question: Environment (don't laugh, if I could change I would)...
Overview... A require 'fileX.pl' statement only seems to work when run from the command line. Not when run as a CGI through the SunOneWebServer. (when run as a CGI it seems to cause the termination of my CGI script?) Details... I have a simple procedure that just returns an array of files in a directory and displays them ($cgi is a CGI object that is visable by this proc)
If I put this code in my main CGI file it is executed perfectly and the file names are printed to the web browser. However, if I put the code in a separate file and then use... ... to suck in the subprocedure and then call it from my CGI, the CGI is not processed any further than the require statement. But... if I execute the CGI from the command line it works fine and the subprocedure (from the require file) is called and executed normally. I have the following at the top of my CGI...
... the word "Test2" is never displayed when run as a CGI but the word "Test1" is?? Any pointers/views/help on this? M
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||