[EMAIL PROTECTED] wrote:

> I installed a web application written in perl. This web application has
> to be installed in his own cgi-bin subdirectory. The main perl script do
> a lot of require 'somefile' to include files in the current directory.
> When that script is executed, the user receive this error message:
> Can't locate layout.ph in @INC (did you run h2ph?) (@INC contains:
> M:/Perl/lib M:/Perl/site/lib .) at
> D:\\chr\\wwwroot\\WebApps\\cgi-bin\\worklist\\main.pl line 54.
> Line 54 contains
>    require 'layout.ph';
> The file layout.ph is in the same directory as main.pl. As I understand,
> I have to add a directory in the "@INC" variable. I have no idea how to
> do that !

It's possible that your current working directory is not where you think it is.
Try printing out the CWD and see where you actually are running from.

use Cwd;
my $cwd = getcwd ();
print "Content-type: text/plain\n\nCWD=$cwd\n";

If you are indeed not where you think you are, you can 'use lib' or
push more dirs onto @INC to find your modules.
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to