LPM: Module question

Matt Cashner sungo at brocksplace.com
Tue Jan 25 14:23:22 CST 2000


On Tue, 25 Jan 2000, David Hempy wrote:

> As such, I don't really want to save the .pm file over in perl/site/lib,
> far from the only code that actually uses it.  I tried saving it alongside
> the .pl programs in my cgi-bin directory use-ing it from there.  Works from
> the command line, but I get a server error via CGI.  I suspect this is some
> kind of PATH problem.

you can do a 
use lib './';

> 
> ps.  As an aside...when I get a Server Error, I expect I've got a syntax
> error (and hence no Content-type), so I just run `perl -c myprog.pl` from
> the command line and fix the problem.  Today was the first time I've gotten
> a Server Error in the browser, but none from the command line.  I can run
> the whole program w/o errors at the console.  Is this a PATH issue?  Any
> idea how I can actually see the error?

print the content before even getting into the script via

BEGIN { print "Content-type:text/html\n\n"; }

then have your script print the error. also, your server's error logs
should contain the error as well, at least they do with apache. not sure
about ms products...

---------------------
Matt Cashner
 sungo at earthling.net
---------------------

"When people are free to do as they please, they usually imitate each other."




More information about the Lexington-pm mailing list