On Dec 8, 2003, at 10:41 AM, Jenda Krynicky wrote:
From: "Ron Goral" <[EMAIL PROTECTED]>
[..]
It appears that the "." directory is in @INC, but the script cannot find
it even though DG_DatabaseManager.pm is in the same directory as
test.cgi. Am I wrong in thinking that "." represents the
"c:\inetpub\wwwroot\cgi-bin\develop\shp_crt" directory when that is
where test.cgi is located?

Yes


I think that might need a bit of clarification.

if there is a "test.cgi" in the same directory
as the DG_DatabaseManager.pm, then his assumption
would seem to be mostly correctish, IF the IIS
actually DOES the 'chdir' to the directory
where the test.cgi code resides.

A simple test would be to make a simple

base_test.cgi

that would do the simple form of stuff

### #!/usr/bin/perl
### use strict;
### use warnings;
### use Cwd;
### BEGIN {
###  use FindBin qw($Bin);;
###  use lib "$Bin" ;
### }
### my $iam = cwd;
### print "Content-type: text/plain \n\n I am at: $iam\n";
###
### print "$_ \n" foreach(@INC);
###

this would tell Ron where exactly IIS was when
that code was invoked in a browser.

You may either add
        use lib 'c:\inetpub\wwwroot\cgi-bin\develop\shp_crt';
[..]

I'm becoming a BIG FAN of the FindBin solution
especially in the case of CGI code, saves on
the problem of knowing where the code is...

Especially if the Web Server is not doing the
expected part of the CGI approach of doing
the chdir into the directory where the code is.

ciao
drieux

---


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to